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 of shape (2, ndim), default=None
The given bound of shape [[x1_min, x2_min, …, xndim_min], [x1_max, x2_max, …, xndim_max]]
- X: matrix-like of shape (n_samples, ndim), default=None
X is the feature matrix representing samples.
- ndim: int, default=2
The number of dimensions.
- epsilon: float, default=0
The minimal distance between the returned bound and the values of X, if bound is not specified.
- bound_must_be_given: bool, default=False
Whether it is allowed for the bound to be None and to be inferred by X.
- Returns
- boundarray-like of shape (2, ndim), default=None
The given bound or bound of X.