skopt.utils.cook_estimator

skopt.utils.cook_estimator(base_estimator, space=None, **kwargs)[source][source]

Cook a default estimator.

For the special base_estimator called “DUMMY” the return value is None. This corresponds to sampling points at random, hence there is no need for an estimator.

Parameters
base_estimator“GP”, “RF”, “ET”, “GBRT”, “DUMMY” or sklearn regressor

Should inherit from sklearn.base.RegressorMixin. In addition the predict method should have an optional return_std argument, which returns std(Y | x)` along with E[Y | x]. If base_estimator is one of [“GP”, “RF”, “ET”, “GBRT”, “DUMMY”], a surrogate model corresponding to the relevant X_minimize function is created.

spaceSpace instance

Has to be provided if the base_estimator is a gaussian process. Ignored otherwise.

kwargsdict

Extra parameters provided to the base_estimator at init time.