Bare-bones CMA-ES¶
-
class
pints.
BareCMAES
(x0, sigma0=0.1, boundaries=None)[source]¶ Finds the best parameters using the CMA-ES method described in [1, 2], using a bare bones re-implementation.
For general use, we recommend the
pints.CMAES
optimiser, which wraps around thecma
module provided by the authors of CMA-ES. Thecma
module provides a battle-tested version of the optimiser.The role of this class, is to provide a simpler implementation of only the core algorithm of CMA-ES, which is easier to read and analyse, and which can be used to compare with bare implementations of other methods.
Extends
PopulationBasedOptimiser
.References
[1] The CMA Evolution Strategy: A Tutorial Nikolaus Hanse, arxiv https://arxiv.org/abs/1604.00772 [2] Hansen, Mueller, Koumoutsakos (2003) “Reducing the time complexity of the derandomized evolution strategy with covariance matrix adaptation (CMA-ES)”. Evolutionary Computation https://doi.org/10.1162/106365603321828970 -
ask
()[source]¶ See
Optimiser.ask()
.
-
cov
(decomposed=False)[source]¶ Returns the current covariance matrix
C
of the proposal distribution.If the optional argument
decomposed
is set toTrue
, a tuple(R, S)
will be returned such thatR
contains the eigenvectors ofC
whileS
is a diagonal matrix containing the squares of the eigenvalues ofC
, such thatC = R S S R.T
.
-
fbest
()[source]¶ See
Optimiser.fbest()
.
-
n_hyper_parameters
()¶
-
name
()[source]¶ See
Optimiser.name()
.
-
needs_sensitivities
()¶ Returns
True
if this methods needs sensitivities to be passed in totell
along with the evaluated error.
-
population_size
()¶ Returns this optimiser’s population size.
If no explicit population size has been set,
None
may 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_of
is 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()
.
-
xbest
()[source]¶ See
Optimiser.xbest()
.
-