mlos_core.optimizers.bayesian_optimizers.bayesian_optimizer

Contains the wrapper classes for base Bayesian optimizers.

Classes

BaseBayesianOptimizer

Abstract base class defining the interface for Bayesian optimization.

Module Contents

class mlos_core.optimizers.bayesian_optimizers.bayesian_optimizer.BaseBayesianOptimizer(*, parameter_space: ConfigSpace.ConfigurationSpace, optimization_targets: List[str], objective_weights: List[float] | None = None, space_adapter: mlos_core.spaces.adapters.adapter.BaseSpaceAdapter | None = None)[source]

Bases: mlos_core.optimizers.optimizer.BaseOptimizer

Abstract base class defining the interface for Bayesian optimization.

Create a new instance of the base optimizer.

Parameters:
  • parameter_space (ConfigSpace.ConfigurationSpace) – The parameter space to optimize.

  • optimization_targets (List[str]) – The names of the optimization targets to minimize. To maximize a target, use the negative of the target when registering scores.

  • objective_weights (Optional[List[float]]) – Optional list of weights of optimization targets.

  • space_adapter (BaseSpaceAdapter) – The space adapter class to employ for parameter space transformations.

abstract acquisition_function(suggestion: mlos_core.data_classes.Suggestion) numpy.typing.NDArray[source]

Invokes the acquisition function from this Bayesian optimizer for the given configuration.

Parameters:

suggestion (Suggestion) – The suggestion containing the configuration(s) to evaluate.

Return type:

numpy.typing.NDArray

abstract surrogate_predict(suggestion: mlos_core.data_classes.Suggestion) numpy.typing.NDArray[source]

Obtain a prediction from this Bayesian optimizer’s surrogate model for the given configuration(s).

Parameters:

suggestion (Suggestion) – The suggestion containing the configuration(s) to predict.

Return type:

numpy.typing.NDArray