gaft.analysis.fitness_store

class gaft.analysis.fitness_store.FitnessStore

Bases: gaft.plugin_interfaces.analysis.OnTheFlyAnalysis

Built-in on-the-fly analysis plugin class for storing fitness related data during iteration.

Attribute:
interval(int): The analysis interval in evolution iteration, default
value is 1 meaning analyze every step.
master_only(bool): Flag for if the analysis plugin is only effective
in master process. Default is True.
finalize(population, engine)

Called after the iteration to allow for custom finalization and post-processing of the collected data.

Parameters:
  • population (Population) – The up to date population of the iteration.
  • engine (gaft.engine.GAEngine) – The current GAEngine where the analysis is running.
register_step(g, population, engine)

Function called in each iteration step.

Parameters:
  • g (int) – Current generation number.
  • population (Population) – The up to date population of the iteration.
  • engine (gaft.engine.GAEngine) – The current GAEngine where the analysis is running.
setup(ng, engine)

Function called right before the start of genetic algorithm main iteration to allow for custom setup of the analysis object.

Parameters:
  • ng (int) – The number of generation.
  • engine (gaft.engine.GAEngine) – The current GAEngine where the analysis is running.