class documentation

class _CMAStopDict(dict):

Constructor: _CMAStopDict(d)

View In Hierarchy

keep and update a termination condition dictionary.

The dictionary is "usually" empty and returned by CMAEvolutionStrategy.stop(). The class methods entirely depend on CMAEvolutionStrategy class attributes.

Details

This class is not relevant for the end-user and could be a nested class, but nested classes cannot be serialized.

Example

>>> import cma
>>> es = cma.CMAEvolutionStrategy(4 * [1], 1, {'verbose':-9})  #doctest: +ELLIPSIS
>>> print(es.stop())
{}
>>> es.optimize(cma.ff.sphere, verb_disp=0)  #doctest: +ELLIPSIS
<...
>>> es.stop()['tolfun'] == 1e-11
True
See Also
OOOptimizer.stop(), CMAEvolutionStrategy.stop()
Method __call__ update and return the termination conditions dictionary
Method __init__ Undocumented
Method clear empty the stopdict
Instance Variable es Undocumented
Instance Variable lastiter Undocumented
Instance Variable opts Undocumented
Instance Variable stoplist Undocumented
Method _addstop Undocumented
Method _update Test termination criteria and update dictionary
Instance Variable _get_value Undocumented
Instance Variable _value Undocumented
def __call__(self, es=None, check=True):

update and return the termination conditions dictionary

def __init__(self, d={}):

Undocumented

def clear(self):

empty the stopdict

es =

Undocumented

lastiter =

Undocumented

opts =

Undocumented

stoplist: list =

Undocumented

def _addstop(self, key, cond=True, val=None):

Undocumented

def _update(self, es):

Test termination criteria and update dictionary

_get_value =

Undocumented

_value =

Undocumented