class documentation
class CMAAdaptSigmaDistanceProportional2(CMAAdaptSigmaBase):
Constructor: CMAAdaptSigmaDistanceProportional2(**kwargs)
update es.sigma = self.sigma * _norm(es.mean),
where self.sigma == es.sigma0 / _norm(x0) ``, for example for test purposes, e.g. to simulate optimal progress rates, where ``self.sigma == es.sigma0.
>>> import cma, warnings >>> cma.evolution_strategy._redistribute_sigma_above = False >>> with warnings.catch_warnings(): ... warnings.simplefilter('ignore', cma.warnings_and_exceptions.NeverTestedWarning) ... es = cma.CMA(4 * [1/2], 2, {'verbose': -9, ... 'AdaptSigma': cma.sigma_adaptation.CMAAdaptSigmaDistanceProportional2}) >>> assert isinstance(es.adapt_sigma, cma.sigma_adaptation.CMAAdaptSigmaDistanceProportional2 ... ), es.adapt_sigma >>> assert es.adapt_sigma.sigma == 2, (es.adapt_sigma.__dict__, es.sigma0) >>> # now we can call es.optimize(...)
CAVEAT: this class was never used.
Details: .initialize is called in CMAEvolutionStrategy.__init__.
evolution_strategy._redistribute_sigma_above changes the meaning
of es.sigma and would brake this update when invoked. To be safe,
assign:
cma.evolution_strategy._redistribute_sigma_above = False
before using CMAAdaptSigmaDistanceProportional2.
| Method | __init__ |
pass distance proportional step-size given ||m|| = 1 |
| Method | initialize |
set self.sigma = es.sigma0. |
| Method | update |
change es.sigma in place, deprecated? |
| Method | update2 |
return sigma change factor |
| Instance Variable | is |
Undocumented |
| Instance Variable | norm0 |
Undocumented |
| Instance Variable | sigma |
Undocumented |
Inherited from CMAAdaptSigmaBase:
| Method | check |
make consistency checks with a CMAEvolutionStrategy instance as input |
| Method | hsig |
return "OK-signal" for rank-one update. |
| Method | initialize |
set parameters and state variable based on dimension, mueff and possibly further options. |
| 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 |