class documentation
class CMAAdaptSigmaTPA(CMAAdaptSigmaBase):
Constructor: CMAAdaptSigmaTPA(dimension, opts, **kwargs)
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 |
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 | s2 |
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 |
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 |
Undocumented |
Instance Variable | ps |
Undocumented |
Method | _update |
update the isotropic evolution path. |
Instance Variable | _ps |
Undocumented |
late initialization.
Parameters | |
N | is used for the (minor) dependency on dimension, |
opts | is used for hacking |