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(*, configs: pandas.DataFrame, context: pandas.DataFrame | None = None) numpy.typing.NDArray[source]

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

Parameters:
  • configs (pandas.DataFrame) – Dataframe of configs / parameters. The columns are parameter names and the rows are the configs.

  • context (pandas.DataFrame) – Not Yet Implemented.

Return type:

numpy.typing.NDArray

abstract surrogate_predict(*, configs: pandas.DataFrame, context: pandas.DataFrame | None = None) numpy.typing.NDArray[source]

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

Parameters:
  • configs (pandas.DataFrame) – Dataframe of configs / parameters. The columns are parameter names and the rows are the configs.

  • context (pandas.DataFrame) – Not Yet Implemented.

Return type:

numpy.typing.NDArray