Acquisition functions

Acquisition functions are used to select new points in the search-space to evaluate in Gaussian-process optimisation.

The available acquisition functions are implemented as classes within inference.gp, and can be passed to GpOptimiser via the acquisition keyword argument as follows:

from inference.gp import GpOptimiser, ExpectedImprovement
GP = GpOptimiser(x, y, bounds=bounds, acquisition=ExpectedImprovement)

The acquisition function classes can also be passed as instances, allowing settings of the acquisition function to be altered:

from inference.gp import GpOptimiser, UpperConfidenceBound
UCB = UpperConfidenceBound(kappa = 2.)
GP = GpOptimiser(x, y, bounds=bounds, acquisition=UCB)

ExpectedImprovement

class inference.gp.ExpectedImprovement

ExpectedImprovement is an acquisition-function class which can be passed to GpOptimiser via the acquisition keyword argument. It implements the expected-improvement acquisition function given by

\[\mathrm{EI}(\underline{x}) = \left( z F(z) + P(z) \right) \sigma(\underline{x})\]

where

\[z = \frac{\mu(\underline{x}) - y_{\mathrm{max}}}{\sigma(\underline{x})}, \qquad P(z) = \frac{1}{\sqrt{2\pi}}\exp{\left(-\frac{1}{2}z^2 \right)}, \qquad F(z) = \frac{1}{2}\left[ 1 + \mathrm{erf}\left(\frac{z}{\sqrt{2}}\right) \right],\]

\(\mu(\underline{x}),\,\sigma(\underline{x})\) are the predictive mean and standard deviation of the Gaussian-process regression model at position \(\underline{x}\), and \(y_{\mathrm{max}}\) is the current maximum observed value of the objective function.

UpperConfidenceBound

class inference.gp.UpperConfidenceBound(kappa: float = 2.0)

UpperConfidenceBound is an acquisition-function class which can be passed to GpOptimiser via the acquisition keyword argument. It implements the upper-confidence-bound acquisition function given by

\[\mathrm{UCB}(\underline{x}) = \mu(\underline{x}) + \kappa \sigma(\underline{x})\]

where \(\mu(\underline{x}),\,\sigma(\underline{x})\) are the predictive mean and standard deviation of the Gaussian-process regression model at position \(\underline{x}\).

Parameters

kappa (float) – Value of the coefficient \(\kappa\) which scales the contribution of the predictive standard deviation to the acquisition function. kappa should be set so that \(\kappa \ge 0\).