paraqeet.optimizers.cmaes_optimizer.CMAEsOptimizer#

class paraqeet.optimizers.cmaes_optimizer.CMAEsOptimizer(measure, optimization_map, logger=None, callback=None)#

Bases: Optimizer

Wrapper for the pycma implementation of CMA-Es.

The pycmi implementation has the following custom options for optimization:

Parameters:
  • noise (float) – Artificial noise added to a function evaluation.

  • init_point (boolean) – Force the use of the initial point in the first generation.

  • spread (float) – Adjust the parameter spread of the first generation cloud.

  • stop_at_convergence (int) – Custom stopping condition. Stop if the cloud shrunk for this number of generations.

  • stop_at_sigma (float) – Custom stopping condition. Stop if the cloud shrunk to this standard deviation.

  • measure (NormalizableMeasurement)

  • optimization_map (OptimizationMap)

  • logger (Logger | None)

See also: http://cma.gforge.inria.fr/apidocs-pycma/

Parameters:
  • measure (Measurement) – Represents any observable and the process of measurement itself.

  • optimization_map (OptimizationMap) – Optimizable interface for all parameters considered in optimization.

  • logger (FileLogger | None, default=None) – The file logger object.

  • callback – Callback function for optimization.

__init__(measure, optimization_map, logger=None, callback=None)#
Parameters:

Methods

__init__(measure, optimization_map[, ...])

optimize(times)

Optimize the system via the CMA-Es optimizer.

Attributes

callback

Returns the current callback function.

logger

Returns the current logger that is being used by this optimizer, or None if no logger was set yet.

optimization_map

Return the optimization map that this optimizer uses.

options

Get options from the system.

property callback: Callable | None#

Returns the current callback function.

property logger: Logger | None#

Returns the current logger that is being used by this optimizer, or None if no logger was set yet.

property optimization_map: OptimizationMap#

Return the optimization map that this optimizer uses.

Parameters that can be optimized need to be added to this map.

Returns:

Returns the optimization map that this optimizer uses.

Return type:

paraqeet.optimization_map

optimize(times)#

Optimize the system via the CMA-Es optimizer.

Performs the actual optimization via the following custom options:

noise: float

Artificial noise added to a function evaluation.

init_point: boolean

Force the use of the initial point in the first generation.

spread: float

Adjust the parameter spread of the first generation cloud.

stop_at_convergenceint

Custom stopping condition. Stop if the cloud shrunk for this number of generations.

stop_at_sigma: float

Custom stopping condition. Stop if the cloud shrunk to this standard deviation.

Note - If input `times` is a float, then the start time of propagation is implicitly assumed to be zero. For an array of times, the first time point is the start time.

Returns:

Result of optimization via the OptimizationResult object. (status, value, iterations and the raw result)

Return type:

OptimizationResult

Parameters:

times (Array | float)

property options: dict#

Get options from the system.