class documentation

class AdaptiveDecoding(object):

Known subclasses: cma.transformations.DiagonalDecoding

View In Hierarchy

base class for adaptive decoding.

The adaptive decoding class is "dual" to the StasticalModel class, in that for linear transformations adapting either one or the other is equivalent.

TODO: this is a stump

Method __init__ len(scaling) determines the dimension.
Method __mul__ A linear transformation expressed by multiplication
Method norm return norm of x prior to the transformation
Method transform apply the transformation / decoding AKA geno-pheno tf
Method transform_inverse inverse transformation (encoding), might return None
Method update AKA update.
Method update_now update model here, if lazy update is implemented
Property condition_number return condition number of the squared transformation matrix
Property correlation_matrix return correlation matrix or None
def __init__(self, scaling):

len(scaling) determines the dimension.

The initial transformation is (typically) np.diag(scaling).

def __mul__(self, x):

A linear transformation expressed by multiplication

def norm(self, x):

return norm of x prior to the transformation

def transform(self, x):

apply the transformation / decoding AKA geno-pheno tf

def transform_inverse(self, x):

inverse transformation (encoding), might return None

def update(self, vectors, weights):

AKA update.

vectors are "isotropic", e.g.:

sm = StatisticalModel...()
ad = AdaptiveDecoding...()
z = sm.sample(1)[0]
y = ad * z  # decoding applied
x = m + y  # candidate solution
ad.tell([sm.transform_inverse(z)], [0.1])
sm.update([y / ad], [0.01]) # remark that y / ad != z

where the symmetric transformation sm.transform_inverse(z) makes z isotropic.

TODO: what exactly does this mean, is this a generic construction, is this even the right construction?

Parameters
vectorsis a list of samples.
weightsdefine a learning rate for each vector.
def update_now(self, lazy_update_gap=None):

update model here, if lazy update is implemented

@property
condition_number =

return condition number of the squared transformation matrix

@property
correlation_matrix =

return correlation matrix or None