class documentation

class CMAAdaptSigmaTPA(CMAAdaptSigmaBase):

View In Hierarchy

two point adaptation for step-size sigma.

Relies on a specific sampling of the first two offspring, whose objective function value ranks are used to decide on the step-size change, see update for the specifics.

Example

>>> import cma
>>> cma.CMAOptions('adapt').pprint()  # doctest: +ELLIPSIS
 AdaptSigma='True...
>>> es = cma.CMAEvolutionStrategy(10 * [0.2], 0.1,
...     {'AdaptSigma': cma.sigma_adaptation.CMAAdaptSigmaTPA,
...      'ftarget': 1e-8})  # doctest: +ELLIPSIS
(5_w,10)-aCMA-ES (mu_w=3.2,w_1=45%) in dimension 10 (seed=...
>>> es.optimize(cma.ff.rosen)  # doctest: +ELLIPSIS
Iter...
>>> assert 'ftarget' in es.stop()
>>> assert es.result[1] <= 1e-8  # should coincide with the above
>>> assert es.result[2] < 6500  # typically < 5500

References: loosely based on Hansen 2008, CMA-ES with Two-Point Step-Size Adaptation, more tightly based on Hansen et al. 2014, How to Assess Step-Size Adaptation Mechanisms in Randomized Search.

Method __init__ Undocumented
Method check_consistency make consistency checks with a CMAEvolutionStrategy instance as input
Method initialize late initialization.
Method update the first and second value in function_values must reflect two mirrored solutions.
Instance Variable dimension Undocumented
Instance Variable initialized Undocumented
Instance Variable last Undocumented
Instance Variable opts Undocumented
Instance Variable s Undocumented
Instance Variable sp Undocumented

Inherited from CMAAdaptSigmaBase:

Method hsig return "OK-signal" for rank-one update, True (OK) or False (stall rank-one update), based on the length of an evolution path
Method initialize_base set parameters and state variable based on dimension, mueff and possibly further options.
Method update2 return sigma change factor and update self.delta.
Instance Variable cs Undocumented
Instance Variable delta cumulated effect of adaptation
Instance Variable is_initialized_base Undocumented
Instance Variable ps Undocumented
Method _update_ps update the isotropic evolution path.
Instance Variable _ps_updated_iteration Undocumented
def __init__(self, dimension=None, opts=None, **kwargs):
def check_consistency(self, es):

make consistency checks with a CMAEvolutionStrategy instance as input

def initialize(self, N=None, opts=None):

late initialization.

Parameters
Nis used for the (minor) dependency on dimension,
optsis used for hacking
def update(self, es, function_values, **kwargs):

the first and second value in function_values must reflect two mirrored solutions.

Mirrored solutions must have been sampled in direction / in opposite direction of the previous mean shift, respectively.

dimension =

Undocumented

initialized: bool =

Undocumented

last =

Undocumented

opts =

Undocumented

s =

Undocumented

sp =

Undocumented