I act like a sequence of parameter values, but with other stuff like an SSE value, too.

Construct me with a Population object. You can set my values with a 1-D Numpy array of initial values.

You can iterate my values in sequence. You can access them (read/write) as items. You can even replace the whole 1-D Numpy array of them at once with another array of like dimensions, although the safest way to do that is supplying a list or 1-D array to update.

ParametersvaluesSet to a sequence of initial parameter values if you're not going to set them with a call to update.
Instance Variable values A 1-D Numpy array of parameter values.
Instance Variable p The Population I am part of.
Instance Variable dt The time difference between start and end of my last evaluation.
Method __init__ Individual(p, values=None)
Method __getstate__ For pickling. Does not include the Population object p.
Method __setstate__ For unpickling. You have to set the p attribute of the unpickled version of me to a Population object.
Method __repr__ Informative string representation, with SSE and pretty-printed values.
Method params Property: A dict of my parameter values, keyed by name.
Method SSE 0 Property: My SSE value, which must at least behave like a float. Infinite if no SSE computed yet, a fatal error occurred during evaluation, or was set to None.
Method SSE Property setter: Sets my SSE value.
Method spawn Returns another instance of my class with the same population and values.
Method copy Returns a complete copy of me, another instance of my class with the same population, values, and SSE.
Method __float__ I can be evaluated as a float using my SSE. A negative SSE translates to inf because it indicates a fatal error.
Method __getitem__ Sequence-like read access to values when k is an integer, dict-like access otherwise.
Method __setitem__ Sequence-like write access to values.
Method __iter__ Sequence-like iteration over values.
Method __nonzero__ I am True if there were no fatal errors during my last evaluation, which would be indicated by an evaluation SSE result of less than zero.
Method __hash__ Undocumented
Method __eq__ I am equal to another Individual if we have the same SSE and values.
Method equals Returns True if my values equal the other individual's values, or the other values themselves if supplied as a sequence or 1-D array.
Method __lt__ My SSE less than other Individual or float?
Method __gt__ My SSE greater than other Individual or float?
Method __sub__ Subtract the other Individual's values from mine and return a new Individual whose values are the differences.
Method __add__ Add the other Individual's values to mine and return a new Individual whose values are the sums.
Method __mul__ Scales each of my values by the constant F.
Method blacklist Sets my SSE to the worst possible value and forces my population to update its sorting to account for my degraded status.
Method update Updates my values as an array form of the supplied list or tuple.
Method evaluate Computes the sum of squared errors (SSE) from my evaluation function using my current values.
Method save Saves my parameters to filePath as a pickled dict.
values =
A 1-D Numpy array of parameter values.
p =
The Population I am part of.
dt =
The time difference between start and end of my last evaluation.
def __init__(self, p, values=None):

Individual(p, values=None)

def __getstate__(self):

For pickling. Does not include the Population object p.

def __setstate__(self, state):

For unpickling. You have to set the p attribute of the unpickled version of me to a Population object.

def __repr__(self):

Informative string representation, with SSE and pretty-printed values.

@property
def params(self):

Property: A dict of my parameter values, keyed by name.

@property
def SSE 0(self):

Property: My SSE value, which must at least behave like a float. Infinite if no SSE computed yet, a fatal error occurred during evaluation, or was set to None.

@SSE.setter
def SSE(self, x):

Property setter: Sets my SSE value.

def spawn(self, values):

Returns another instance of my class with the same population and values.

def copy(self):

Returns a complete copy of me, another instance of my class with the same population, values, and SSE.

def __float__(self):

I can be evaluated as a float using my SSE. A negative SSE translates to inf because it indicates a fatal error.

def __getitem__(self, k):

Sequence-like read access to values when k is an integer, dict-like access otherwise.

def __setitem__(self, k, value):

Sequence-like write access to values.

def __iter__(self):

Sequence-like iteration over values.

def __nonzero__(self):

I am True if there were no fatal errors during my last evaluation, which would be indicated by an evaluation SSE result of less than zero.

I will evaluate as True even if my SSE is None, infinite, or NaN, so long as it is not negative.

def __hash__(self):
Undocumented
def __eq__(self, other):

I am equal to another Individual if we have the same SSE and values.

def equals(self, other):

Returns True if my values equal the other individual's values, or the other values themselves if supplied as a sequence or 1-D array.

def __lt__(self, other):

My SSE less than other Individual or float?

def __gt__(self, other):

My SSE greater than other Individual or float?

def __sub__(self, other):

Subtract the other Individual's values from mine and return a new Individual whose values are the differences.

def __add__(self, other):

Add the other Individual's values to mine and return a new Individual whose values are the sums.

def __mul__(self, F):

Scales each of my values by the constant F.

def blacklist(self):

Sets my SSE to the worst possible value and forces my population to update its sorting to account for my degraded status.

def update(self, values):

Updates my values as an array form of the supplied list or tuple.

Raises an exception if there's a different number of values than my values length Nd.

def evaluate(self, xSSE=None):

Computes the sum of squared errors (SSE) from my evaluation function using my current values.

Stores the result in my SSE attribute and returns a reference to me for convenience.

If the SSE value is less than zero, or results in a Twisted failure, ade will abort operations. Use this feature to provide your evaluator with a simple way to stop everything if something goes terribly wrong.

Updates my dt attribute with the elapsed time for this evaluation.

Returns a Deferred that fires with a reference to my instance when the evaluation is done, pass or fail.

def save(self, filePath):

Saves my parameters to filePath as a pickled dict.

API Documentation for ade, generated by pydoctor at 2019-05-15 11:01:59.