smac.optimizer.acquisition module

class smac.optimizer.acquisition.AbstractAcquisitionFunction(model: smac.epm.base_epm.AbstractEPM, **kwargs)[source]

Bases: object

Abstract base class for acquisition function

model
logger

Constructor

Parameters:model (AbstractEPM) – Models the objective function.
update(**kwargs)[source]

Update the acquisition functions values.

This method will be called if the model is updated. E.g. entropy search uses it to update its approximation of P(x=x_min), EI uses it to update the current fmin.

The default implementation takes all keyword arguments and sets the respective attributes for the acquisition function object.

Parameters:kwargs
class smac.optimizer.acquisition.EI(model: smac.epm.base_epm.AbstractEPM, par: float = 0.0, **kwargs)[source]

Bases: smac.optimizer.acquisition.AbstractAcquisitionFunction

Computes for a given x the expected improvement as acquisition value.

\(EI(X) := \mathbb{E}\left[ \max\{0, f(\mathbf{X^+}) - f_{t+1}(\mathbf{X}) - \xi\right] \} ]\), with \(f(X^+)\) as the incumbent.

Constructor

Parameters:
  • model (AbstractEPM) –
    A model that implements at least
    • predict_marginalized_over_instances(X)
  • par (float, default=0.0) – Controls the balance between exploration and exploitation of the acquisition function.
update(**kwargs)

Update the acquisition functions values.

This method will be called if the model is updated. E.g. entropy search uses it to update its approximation of P(x=x_min), EI uses it to update the current fmin.

The default implementation takes all keyword arguments and sets the respective attributes for the acquisition function object.

Parameters:kwargs
class smac.optimizer.acquisition.EIPS(model: smac.epm.base_epm.AbstractEPM, par: float = 0.0, **kwargs)[source]

Bases: smac.optimizer.acquisition.EI

Computes for a given x the expected improvement as acquisition value. \(EI(X) := \frac{\mathbb{E}\left[ \max\{0, f(\mathbf{X^+}) - f_{t+1}(\mathbf{X}) - \xi\right] \} ]} {np.log10(r(x))}\), with \(f(X^+)\) as the incumbent and \(r(x)\) as runtime.

Parameters:
  • model (AbstractEPM) –
    A model that implements at least
    • predict_marginalized_over_instances(X) returning a tuples of predicted cost and running time
  • par (float, default=0.0) – Controls the balance between exploration and exploitation of the acquisition function.
update(**kwargs)

Update the acquisition functions values.

This method will be called if the model is updated. E.g. entropy search uses it to update its approximation of P(x=x_min), EI uses it to update the current fmin.

The default implementation takes all keyword arguments and sets the respective attributes for the acquisition function object.

Parameters:kwargs
class smac.optimizer.acquisition.LogEI(model: smac.epm.base_epm.AbstractEPM, par: float = 0.0, **kwargs)[source]

Bases: smac.optimizer.acquisition.AbstractAcquisitionFunction

Computes for a given x the logarithm expected improvement as acquisition value.

Parameters:
  • model (AbstractEPM) –
    A model that implements at least
    • predict_marginalized_over_instances(X)
  • par (float, default=0.0) – Controls the balance between exploration and exploitation of the acquisition function.
update(**kwargs)

Update the acquisition functions values.

This method will be called if the model is updated. E.g. entropy search uses it to update its approximation of P(x=x_min), EI uses it to update the current fmin.

The default implementation takes all keyword arguments and sets the respective attributes for the acquisition function object.

Parameters:kwargs