optunity.solvers.CMAES module

class optunity.solvers.CMAES.CMA_ES(num_generations, sigma=1.0, Lambda=None, **kwargs)[source]

Bases: optunity.solvers.util.Solver

Please refer to CMA-ES for details about this algorithm.

This solver uses an implementation available in the DEAP library [DEAP2012].

Warning

This solver has dependencies on DEAP and NumPy and will be unavailable if these are not met.

blah

Warning

This solver is not explicitly constrained. The box constraints that are given are used for initialization, but solver may leave the specified region during iterations. If this is unacceptable, you must manually constrain the domain of the objective function prior to using this solver (cfr. Domain constraints).

desc_brief = 'covariance matrix adaptation evolutionary strategy'
desc_full = ['CMA-ES: covariance matrix adaptation evolutionary strategy', ' ', 'This method requires the following parameters:', '- num_generations :: number of generations to use', '- sigma :: (optional) initial covariance, default 1', '- Lambda :: (optional) measure of reproducibility', '- starting point: through kwargs ', 'This method is described in detail in:', 'Hansen and Ostermeier, 2001. Completely Derandomized Self-Adaptation in Evolution Strategies. Evolutionary Computation']
lambda_[source]
maximize(f, pmap=<built-in function map>)

Maximizes f.

Parameters:
  • f (callable) – the objective function
  • pmap (callable) – the map() function to use
Returns:

  • the arguments which optimize f
  • an optional solver report, can be None

minimize(f, pmap=<built-in function map>)

Minimizes f.

Parameters:
  • f (callable) – the objective function
  • pmap (callable) – the map() function to use
Returns:

  • the arguments which optimize f
  • an optional solver report, can be None

name = 'cma-es'
num_generations[source]
optimize(f, maximize=True, pmap=<built-in function map>)[source]

Optimizes f.

Parameters:
  • f (callable) – the objective function
  • maximize (boolean) – do we want to maximizes?
  • pmap (callable) – the map() function to use
Returns:

  • the arguments which optimize f
  • an optional solver report, can be None

sigma[source]
start[source]

Returns the starting point for CMA-ES.

static suggest_from_seed(num_evals, **kwargs)[source]

Table Of Contents

This Page

Previous topic

Solvers

Next topic

optunity.solvers.GridSearch module