|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectec.Statistics
ec.gp.koza.KozaStatistics
A simple Koza-style statistics generator. Prints the mean fitness (raw,adjusted,hits) and best individual of each generation. At the end, prints the best individual of the run and the number of individuals processed.
If gather-full is true, then final timing information, number of nodes and depths of trees, approximate final memory utilization, etc. are also given.
Compressed files will be overridden on restart from checkpoint; uncompressed files will be appended on restart.
KozaStatistics implements a simple version of steady-state statistics in the same fashion that SimpleStatistics does: if it quits before a generation boundary, it will include the best individual discovered, even if the individual was discovered after the last boundary. This is done by using individualsEvaluatedStatistics(...) to update best-individual-of-generation in addition to doing it in postEvaluationStatistics(...).
Parameters
base.gzip boolean |
(whether or not to compress the file (.gz suffix added) |
base.file String (a filename), or nonexistant (signifies stdout) |
(the log for statistics) |
base.gather-full bool = true or false (default) |
(should we full statistics on individuals (will run slower, though the slowness is due to off-line processing that won't mess up timings) |
Field Summary | |
Individual[] |
best_of_run
The best individual we've found so far |
static java.lang.String |
P_COMPRESS
compress? |
static java.lang.String |
P_FULL
|
static java.lang.String |
P_STATISTICS_FILE
log file parameter |
int |
statisticslog
The Statistics' log |
Fields inherited from class ec.Statistics |
children, P_CHILD, P_NUMCHILDREN |
Constructor Summary | |
KozaStatistics()
|
Method Summary | |
void |
finalStatistics(EvolutionState state,
int result)
Logs the best individual of the run. |
void |
individualsEvaluatedStatistics(SteadyStateEvolutionState state)
Steady State only: loads any additional post-generation boundary stragglers into best_of_run. |
void |
postBreedingStatistics(EvolutionState state)
Called immediately after breeding occurs. |
void |
postEvaluationStatistics(EvolutionState state)
Called immediately after evaluation occurs. |
void |
postInitializationStatistics(EvolutionState state)
Called immediately after population initialization occurs. |
void |
preBreedingStatistics(EvolutionState state)
Called immediately before breeding occurs. |
void |
preEvaluationStatistics(EvolutionState state)
Called immediately before evaluation occurs. |
void |
preInitializationStatistics(EvolutionState state)
Called immediately before population initialization occurs. |
void |
setup(EvolutionState state,
Parameter base)
Sets up the object by reading it from the parameters stored in state, built off of the parameter base base. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface ec.steadystate.SteadyStateStatisticsForm |
individualsBredStatistics, postInitialEvaluationStatistics, preInitialEvaluationStatistics |
Field Detail |
public static final java.lang.String P_STATISTICS_FILE
public int statisticslog
public Individual[] best_of_run
public static final java.lang.String P_COMPRESS
public static final java.lang.String P_FULL
Constructor Detail |
public KozaStatistics()
Method Detail |
public void setup(EvolutionState state, Parameter base)
Setup
setup
in interface Setup
setup
in class Statistics
public void preInitializationStatistics(EvolutionState state)
SteadyStateStatisticsForm
preInitializationStatistics
in interface SteadyStateStatisticsForm
preInitializationStatistics
in class Statistics
public void postInitializationStatistics(EvolutionState state)
SteadyStateStatisticsForm
postInitializationStatistics
in interface SteadyStateStatisticsForm
postInitializationStatistics
in class Statistics
public void preBreedingStatistics(EvolutionState state)
Statistics
preBreedingStatistics
in class Statistics
public void postBreedingStatistics(EvolutionState state)
Statistics
postBreedingStatistics
in class Statistics
public void preEvaluationStatistics(EvolutionState state)
Statistics
preEvaluationStatistics
in class Statistics
public void postEvaluationStatistics(EvolutionState state)
Statistics
postEvaluationStatistics
in class Statistics
public void individualsEvaluatedStatistics(SteadyStateEvolutionState state)
individualsEvaluatedStatistics
in interface SteadyStateStatisticsForm
individualsEvaluatedStatistics
in class Statistics
public void finalStatistics(EvolutionState state, int result)
finalStatistics
in interface SteadyStateStatisticsForm
finalStatistics
in class Statistics
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |