class CMAAdaptSigmaDistanceProportional(CMAAdaptSigmaBase):
Constructor: CMAAdaptSigmaDistanceProportional(coefficient, direct_mode, **kwargs)
artificial setting of sigma proportional to ||m||,
specifically sigma = coefficient * mueff * norm(mean) / dimension / c_m or sigma = coefficient * norm(mean) in direct mode.
>>> import cma >>> cma.evolution_strategy._redistribute_sigma_above = False >>> es = cma.CMAEvolutionStrategy(4 * [1/2], 2, {'verbose': -9, ... 'AdaptSigma': cma.sigma_adaptation.CMAAdaptSigmaDistanceProportional( ... 1.2, True)}) >>> # now we can call es.optimize(...) >>> assert isinstance(es.adapt_sigma, cma.sigma_adaptation.CMAAdaptSigmaDistanceProportional ... ), es.adapt_sigma >>> assert es.sigma == 1.2, (es.adapt_sigma.__dict__, es.sigma)
The optimal coefficient in infinite dimension is 1.253 = (pi/2)**0.5,
the optimal mueff is lambda / pi, hence the optimal phi is pi/2 x
lambda / pi / 2 = lambda / 4 where exp(-phi/n) is the (log-)expected
convergence rate per iteration.
This is mainly useful for test purposes, e.g. to simulate optimal progress rates.
Details: setting cma.options_parameters.CMAOptions._stationary_sphere to
True has on scaling invariant functions the "same effect". Instead of
changing sigma, it resets norm(mean) at the end of tell.
| Method | __init__ |
pass coefficient multiplier for normalized step-size |
| Method | initialize |
same as update, set the correct step-size before the first iteration |
| Method | update |
update es.sigma by calling update2. |
| Method | update2 |
return sigma update factor. |
| Instance Variable | coefficient |
Undocumented |
| Instance Variable | direct |
experimental: when True, interpret coefficient as sigma / norm(mean) |
| Instance Variable | is |
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 |