class documentation

class CountLastSameChanges:

View In Hierarchy

An array/list of successive same-sign counts.

.same_changes[i] counts how often the same sign was successively observed during update(..., i, change). When the sign flips, .same_changes[i] is reset to 1 or -1.

init needs to be called before the class instance can be used. A valid use case is lsc = CountLastSameChanges().init(dimension).

TODO: parameters may need to depend on population size?

Method __init__ Undocumented
Method init do not overwrite user-set values unless force
Method shape_exponent return value to be added to exponent from change count.
Method update update same_changes[i] count based on the sign of change
Instance Variable chi_exponent_factor increase chi exponent up to given threshold, can make up for dimension dependent chi
Instance Variable chi_exponent_threshold Undocumented
Instance Variable parent count of the number of changes with the same sign, where
Instance Variable same_changes Undocumented
Property dimension Undocumented
def __init__(self, parent=None):

Undocumented

def init(self, dimension, force=False):

do not overwrite user-set values unless force

def shape_exponent(self, i):

return value to be added to exponent from change count.

return a positive/negative value (or zero) when the last change was respectively postive/negative.

The value is zero for the first chi_exponent_threshold same changes and increases linearly for the next chi_exponent_threshold same changes and then stays at the threshold value as long as the change does not flip sign.

def update(self, i, change):

update same_changes[i] count based on the sign of change

chi_exponent_factor =

increase chi exponent up to given threshold, can make up for dimension dependent chi

chi_exponent_threshold =

Undocumented

parent =

count of the number of changes with the same sign, where

same_changes =

Undocumented

@property
dimension =

Undocumented