LBFGS

does this and that…

class olympus.planners.Lbfgs(goal='minimize', disp=None, eps=1e-08, ftol=2.220446049250313e-09, gtol=1e-05, maxcor=10, maxfun=15000, maxiter=15000, maxls=20, init_guess=None, init_guess_method='random', init_guess_seed=None)[source]

L-BFGS-B optimizer based on the SciPy implementation.

Parameters
  • goal (str) – The optimization goal, either ‘minimize’ or ‘maximize’. Default is ‘minimize’.

  • disp (None or int) – If disp is None (the default), then the supplied version of iprint is used. If disp is not None, then it overrides the supplied version of iprint with the behaviour you outlined.

  • eps (float) – Step size used for numerical approximation of the jacobian.

  • ftol (float) – The iteration stops when (f^k - f^{k+1})/max{|f^k|,|f^{k+1}|,1} <= ftol.

  • gtol (float) – The iteration will stop when max{|proj g_i | i = 1, …, n} <= gtol where pg_i is the i-th component of the projected gradient.

  • maxcor (int) – The maximum number of variable metric corrections used to define the limited memory matrix. (The limited memory BFGS method does not store the full hessian but uses this many terms in an approximation to it.)

  • maxfun (int) – Maximum number of function evaluations.

  • maxiter (int) – Maximum number of iterations.

  • maxls (int, optional) – Maximum number of line search steps (per iteration).

  • init_guess (array, optional) – initial guess for the optimization

  • init_guess_method (str) – method to construct initial guesses if init_guess is not provided. Choose from: random

  • init_guess_seed (str) – random seed for init_guess_method

Methods

tell([observations])

Provide the planner with all previous observations.

ask([return_as])

suggest new set of parameters

recommend([observations, return_as])

Consecutively executes tell and ask: tell the planner about all previous observations, and ask about the next query point.

optimize(emulator[, num_iter, verbose])

Optimizes a surface for a fixed number of iterations.

set_param_space(param_space)

Defines the parameter space over which the planner will search.

ask(return_as=None)

suggest new set of parameters

Parameters

return_as (string) – choose data type for returned parameters allowed options (dict, array)

Returns

newly generated parameters

Return type

ParameterVector

optimize(emulator, num_iter=1, verbose=False)

Optimizes a surface for a fixed number of iterations.

Parameters
  • emulator (object) – Emulator or a Surface instance to optimize over.

  • num_iter (int) – Maximum number of iterations allowed.

  • verbose (bool) – Whether to print information to screen.

Returns

Campaign object with information about the optimization, including all parameters

tested and measurements obtained.

Return type

campaign (Campaign)

recommend(observations=None, return_as=None)

Consecutively executes tell and ask: tell the planner about all previous observations, and ask about the next query point.

Parameters
  • observations (list of ???) –

  • return_as (string) – choose data type for returned parameters allowed options (dict, array)

Returns

newly generated parameters

Return type

list

set_param_space(param_space)

Defines the parameter space over which the planner will search.

Parameters

param_space (ParameterSpace) – a ParameterSpace object defining the space over which to search.

tell(observations=<olympus.campaigns.observations.Observations object>)

Provide the planner with all previous observations.

Parameters

observations (Observations) – an Observation object containing all previous observations. This defines the history of the campaign seen by the planner. The default is None, i.e. there are no previous observations.