Statistics – statistical structure module

This module have the class which is reponsible to keep statistics of each generation. This class is used by the adapters and other statistics dump objects.

class Statistics.Statistics

Statistics Class - A class bean-like to store the statistics

The statistics hold by this class are:

rawMax, rawMin, rawAve
Maximum, minimum and average of raw scores
rawDev, rawVar
Standard Deviation and Variance of raw scores
fitMax, fitMin, fitAve
Maximum, mininum and average of fitness scores
>>> stats = ga_engine.getStatistics()
>>> st["rawMax"]
Returns the stats as a python tuple
Set all statistics to zero
Instantiate a new Statistic class with the same contents

Copy the values to the obj variable of the same class

Parameter:obj – the Statistics object destination
Return a tuple (name, value) for all stored statistics

Recent Blog Posts

Previous topic

FunctionSlot – function slots module

Next topic

GSimpleGA – the genetic algorithm by itself

This Page