class documentation

Overwrite some variables with some given fixed values,

thereby removing their effect on the resulting composed function, making them a neutral subspace.

The constructor takes indices and values. Then, x[indices] = values is executed (on a copy) each time before the function is called.

An instance call returns f(self.transform(x)).

Caveat: this has never been thoroughly tested.

>>> from cma import fitness_transformations as ft
>>> fun = ft.NeutralVariables(cma.ff.sphere, [2, 3], 0)
>>> 1**2 + 2**2 == fun([1,2,3,4])
True
Method __init__ return f with neutral subspace indices
Method transform copy x and set x[indices] = values and return x.
Instance Variable _indices Undocumented
Instance Variable _values Undocumented

Inherited from ComposedFunction:

Method __call__ Undocumented
Method inverse evaluate the composition of inverses on x.
Instance Variable list_of_inverses Undocumented

Inherited from Function (via ComposedFunction):

Method initialize initialization of Function
Instance Variable evaluations Undocumented
Instance Variable ftarget Undocumented
Instance Variable target_hit_at Undocumented
Property function_names_to_evaluate_first_found attributes which are searched for to be called if no function was given to __init__.
Class Variable _function_names_to_evaluate_first_found Undocumented
Instance Variable __callable Undocumented
Instance Variable __initialized Undocumented
def __init__(self, f, indices, values):

return f with neutral subspace indices

def transform(self, x):

copy x and set x[indices] = values and return x.

This is the first transformation in this function composition.

_indices =

Undocumented

_values =

Undocumented