skactiveml.utils.check_bound#

skactiveml.utils.check_bound(bound=None, X=None, ndim=2, epsilon=0, bound_must_be_given=False)[source]#

Validates bound and returns the bound of X if bound is None. bound or X must not be None.

Parameters
bound: array-like, shape (2, ndim), optional (default=None)

The given bound of shape [[x1_min, x2_min, …, xndim_min], [x1_max, x2_max, …, xndim_max]]

X: matrix-like, shape (n_samples, ndim), optional (default=None)

The sample matrix X is the feature matrix representing samples.

ndim: int, optional (default=2)

The number of dimensions.

epsilon: float, optional (default=0)

The minimal distance between the returned bound and the values of X, if bound is not specified.

bound_must_be_given: bool, optional (default=False)

Whether it is allowed for the bound to be None and to be inferred by X.

Returns
bound: array-like, shape (2, ndim), optional (default=None)

The given bound or bound of X.