bayes_halving_search_cv.Space#

class bayes_halving_search_cv.Space(param_grid)#

Ordered collection of Dimensions; all point math lives here.

diagonal()#

Length of the space diagonal in normalized space.

distance(a, b)#

Normalized-space distance: Euclidean numeric + Hamming categorical.

extrapolate(base, ref)#

Pattern move target: 2*base - ref, snapped/clipped to the grid.

Categorical dims have no direction: the pattern move keeps base’s value.

indices(params)#

{name: value} dict -> index tuple (nearest grid point).

params(idx)#

Index tuple -> {name: value} dict.