syne_tune.optimizer.schedulers.searchers.bayesopt.sklearn.estimator module

class syne_tune.optimizer.schedulers.searchers.bayesopt.sklearn.estimator.SKLearnEstimator[source]

Bases: object

Base class scikit-learn based estimators, giving rise to surrogate models for Bayesian optimization.

fit(X, y, update_params)[source]

Implements fit_from_state(), given transformed data. Here, y is normalized (zero mean, unit variance) iff normalize_targets == True.

Parameters:
  • X (ndarray) – Feature matrix, shape (n_samples, n_features)

  • y (ndarray) – Target values, shape (n_samples,)

  • update_params (bool) – Should model (hyper)parameters be updated? Ignored if estimator has no hyperparameters

Return type:

SKLearnPredictor

Returns:

Predictor, wrapping the posterior state

get_params()[source]
Return type:

Dict[str, Any]

Returns:

Current model hyperparameters

set_params(param_dict)[source]
Parameters:

param_dict (Dict[str, Any]) – New model hyperparameters

property normalize_targets: bool
Returns:

Should targets in state be normalized before calling fit()?