class documentation

class _StopTolXStagnation(object):

Constructor: _StopTolXStagnation(x)

View In Hierarchy

Provide a termination signal depending on how much a vector has changed,

typically applied to the distribution mean over several iterations.

The stop property is the boolean termination signal, the update method needs to be called in each iteration with the (changing) vector.

self.stop is True iff - delta t > threshold and - Delta x < delta * max(1, sqrt(delta t / threshold)) for at least delta t iterations.

The (iteration) threshold is computed in property time_threshold based on the iteration count and three parameters as p1 + p2 * count**p3.

Method __init__ x is the initial vector (optional), default settings are taken from CMAOptions
Method set_params param_values is a list conforming to CMAOptions['tolxstagnation'].
Method update caveat: this stores x as a reference
Instance Variable count Undocumented
Instance Variable count_x Undocumented
Instance Variable delta Undocumented
Instance Variable time_delta_expo Undocumented
Instance Variable time_delta_frac Undocumented
Instance Variable time_delta_offset Undocumented
Instance Variable x Undocumented
Property stop Undocumented
Property time_threshold Undocumented
def __init__(self, x=None):

x is the initial vector (optional), default settings are taken from CMAOptions

def set_params(self, param_values, names=('delta', 'time_delta_offset', 'time_delta_frac', 'time_delta_expo')):

param_values is a list conforming to CMAOptions['tolxstagnation'].

Do nothing if param_values in (None, True), set delta = -1 if param_values is False.

None entries in param_values don't change the respective parameter and [0.12] is the same as [0.12, None, None, None].

Details: In principle, 'delta' should be propto sqrt(mu/dimension).

def update(self, x):

caveat: this stores x as a reference

count: int =

Undocumented

count_x =

Undocumented

delta: int =

Undocumented

time_delta_expo: int =

Undocumented

time_delta_frac =

Undocumented

time_delta_offset =

Undocumented

x =

Undocumented

@property
stop =

Undocumented

@property
time_threshold =

Undocumented