CMA-ES¶
- class pints.CMAES(x0, sigma0=None, boundaries=None)[source]¶
Finds the best parameters using the CMA-ES method described in [1], [2] and implemented in the
cmamodule [3].CMA-ES stands for Covariance Matrix Adaptation Evolution Strategy, and is designed for non-linear derivative-free optimization problems.
To initialise, set an initial position
x0, an initial covariancesigma0, and optionally a set ofpints.Boundaries.CMA-ES is designed for multivariate optimisation, so
x0should have a dimension of 2 or greater.The initial covariance
sigma0should be a scalar (one standard deviation for all parameters), but for compatibility with other optimisers an array is also accepted: in this case the smallest value insigma0will be used. If nosigma0is given a guess will be made based on the boundaries (if provided) orx0, seeOptimiser()for details. The method’s authors suggest choosingsigma0such that the optimum is expected to be within3 * sigma0from the initial positionx0.Rectangular boundariesare supported by thecmamodule natively. Other boundary shapes are also supported but will be handled byPINTS(which will passnantocmafor any point requested outside of the boundaries).Extends
PopulationBasedOptimiser.References
- ask()[source]¶
See
Optimiser.ask().
- f_best()[source]¶
See
Optimiser.f_best().
- n_hyper_parameters()¶
- classmethod name()[source]¶
See
Optimiser.name().
- needs_sensitivities()¶
Returns
Trueif this methods needs sensitivities to be passed in totellalong with the evaluated error.
- population_size()¶
Returns this optimiser’s population size.
If no explicit population size has been set,
Nonemay be returned. Once running, the correct value will always be returned.
- running()[source]¶
See
Optimiser.running().
- set_hyper_parameters(x)¶
The hyper-parameter vector is
[population_size].
- set_population_size(population_size=None)¶
Sets a population size to use in this optimisation.
If population_size is set to
None, the population size will be set using the heuristicsuggested_population_size().
- stop()[source]¶
See
Optimiser.stop().
- suggested_population_size(round_up_to_multiple_of=None)¶
Returns a suggested population size for this method, based on the dimension of the search space (e.g. the parameter space).
If the optional argument
round_up_to_multiple_ofis set to an integer greater than 1, the method will round up the estimate to a multiple of that number. This can be useful to obtain a population size based on e.g. the number of worker processes used to perform objective function evaluations.
- tell(fx)[source]¶
See
Optimiser.tell().
- x_best()[source]¶
See
Optimiser.x_best().