class documentation

class CMAAdaptSigmaDistanceProportional2(CMAAdaptSigmaBase):

Constructor: CMAAdaptSigmaDistanceProportional2(**kwargs)

View In Hierarchy

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_initialized Undocumented
Instance Variable norm0 Undocumented
Instance Variable sigma Undocumented

Inherited from CMAAdaptSigmaBase:

Method check_consistency make consistency checks with a CMAEvolutionStrategy instance as input
Method hsig return "OK-signal" for rank-one update.
Method initialize_base 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_initialized_base Undocumented
Instance Variable ps Undocumented
Method _update_ps update the isotropic evolution path.
Instance Variable _ps_updated_iteration Undocumented
def __init__(self, **kwargs):

pass distance proportional step-size given ||m|| = 1

def initialize(self, es, *args, **kwargs):

set self.sigma = es.sigma0.

def update(self, es, **kwargs):

change es.sigma in place, deprecated?

def update2(self, es, **kwargs):

return sigma change factor

is_initialized: bool =

Undocumented

norm0 =

Undocumented

sigma =

Undocumented