pyGPGO.acquisition module

class pyGPGO.acquisition.Acquisition(mode, eps=1e-06, **params)[source]

Bases: object

Acquisition function class.

Parameters:
  • mode (str) – Defines the behaviour of the acquisition strategy. Currently supported values are ExpectedImprovement, IntegratedExpectedÌmprovement, ProbabilityImprovement, IntegratedProbabilityImprovement, UCB, IntegratedUCB, Entropy, tExpectedImprovement, and tIntegratedExpectedImprovement. Integrated improvement functions are only to be used with MCMC surrogates.
  • eps (float) – Small floating value to avoid np.sqrt or zero-division warnings.
  • params (float) – Extra parameters needed for certain acquisition functions, e.g. UCB needs to be supplied with beta.
Entropy(tau, mean, std, sigman=1.0)[source]

Predictive entropy acquisition function

Parameters:
  • tau (float) – Best observed function evaluation.
  • mean (float) – Point mean of the posterior process.
  • std (float) – Point std of the posterior process.
  • sigman (float) – Noise variance
Returns:

Predictive entropy.

Return type:

float

ExpectedImprovement(tau, mean, std)[source]

Expected Improvement acquisition function.

Parameters:
  • tau (float) – Best observed function evaluation.
  • mean (float) – Point mean of the posterior process.
  • std (float) – Point std of the posterior process.
Returns:

Expected improvement.

Return type:

float

IntegratedExpectedImprovement(tau, meanmcmc, stdmcmc)[source]

Integrated expected improvement. Can only be used with GaussianProcessMCMC instance.

Parameters:
  • tau (float) – Best observed function evaluation
  • meanmcmc (array-like) – Means of posterior predictive distributions after sampling.
  • stdmcmc – Standard deviations of posterior predictive distributions after sampling.
Returns:

Integrated Expected Improvement

Return type:

float

IntegratedProbabilityImprovement(tau, meanmcmc, stdmcmc)[source]

Integrated probability of improvement. Can only be used with GaussianProcessMCMC instance.

Parameters:
  • tau (float) – Best observed function evaluation
  • meanmcmc (array-like) – Means of posterior predictive distributions after sampling.
  • stdmcmc – Standard deviations of posterior predictive distributions after sampling.
Returns:

Integrated Probability of Improvement

Return type:

float

IntegratedUCB(tau, meanmcmc, stdmcmc, beta=1.5)[source]

Integrated probability of improvement. Can only be used with GaussianProcessMCMC instance.

Parameters:
  • tau (float) – Best observed function evaluation
  • meanmcmc (array-like) – Means of posterior predictive distributions after sampling.
  • stdmcmc – Standard deviations of posterior predictive distributions after sampling.
  • beta (float) – Hyperparameter controlling exploitation/exploration ratio.
Returns:

Integrated UCB.

Return type:

float

ProbabilityImprovement(tau, mean, std)[source]

Probability of Improvement acquisition function.

Parameters:
  • tau (float) – Best observed function evaluation.
  • mean (float) – Point mean of the posterior process.
  • std (float) – Point std of the posterior process.
Returns:

Probability of improvement.

Return type:

float

UCB(tau, mean, std, beta=1.5)[source]

Upper-confidence bound acquisition function.

Parameters:
  • tau (float) – Best observed function evaluation.
  • mean (float) – Point mean of the posterior process.
  • std (float) – Point std of the posterior process.
  • beta (float) – Hyperparameter controlling exploitation/exploration ratio.
Returns:

Upper confidence bound.

Return type:

float

__init__(mode, eps=1e-06, **params)[source]

Acquisition function class.

Parameters:
  • mode (str) – Defines the behaviour of the acquisition strategy. Currently supported values are ExpectedImprovement, IntegratedExpectedÌmprovement, ProbabilityImprovement, IntegratedProbabilityImprovement, UCB, IntegratedUCB, Entropy, tExpectedImprovement, and tIntegratedExpectedImprovement. Integrated improvement functions are only to be used with MCMC surrogates.
  • eps (float) – Small floating value to avoid np.sqrt or zero-division warnings.
  • params (float) – Extra parameters needed for certain acquisition functions, e.g. UCB needs to be supplied with beta.
eval(tau, mean, std)[source]

Evaluates selected acquisition function.

Parameters:
  • tau (float) – Best observed function evaluation.
  • mean (float) – Point mean of the posterior process.
  • std (float) – Point std of the posterior process.
Returns:

Acquisition function value.

Return type:

float

tExpectedImprovement(tau, mean, std, nu=3.0)[source]

Expected Improvement acquisition function. Only to be used with tStudentProcess surrogate.

Parameters:
  • tau (float) – Best observed function evaluation.
  • mean (float) – Point mean of the posterior process.
  • std (float) – Point std of the posterior process.
Returns:

Expected improvement.

Return type:

float

tIntegratedExpectedImprovement(tau, meanmcmc, stdmcmc, nu=3.0)[source]

Integrated expected improvement. Can only be used with tStudentProcessMCMC instance.

Parameters:
  • tau (float) – Best observed function evaluation
  • meanmcmc (array-like) – Means of posterior predictive distributions after sampling.
  • stdmcmc – Standard deviations of posterior predictive distributions after sampling.
  • nu – Degrees of freedom.
Returns:

Integrated Expected Improvement

Return type:

float