|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectec.Statistics
ec.simple.SimpleStatistics
A basic Statistics class suitable for simple problem applications. SimpleStatistics prints out the best individual, per subpopulation, each generation. At the end of a run, it also prints out the best individual of the run. SimpleStatistics outputs this data to a log which may either be a provided file or stdout. Compressed files will be overridden on restart from checkpoint; uncompressed files will be appended on restart.
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) |
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_STATISTICS_FILE
log file parameter |
int |
statisticslog
The Statistics' log |
Fields inherited from class ec.Statistics |
children, P_CHILD, P_NUMCHILDREN |
Constructor Summary | |
SimpleStatistics()
|
Method Summary | |
void |
finalStatistics(EvolutionState state,
int result)
Logs the best individual of the run. |
void |
postEvaluationStatistics(EvolutionState state)
Logs the best individual of the generation. |
void |
postInitializationStatistics(EvolutionState state)
Called immediately after 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 |
Field Detail |
public static final java.lang.String P_STATISTICS_FILE
public static final java.lang.String P_COMPRESS
public int statisticslog
public Individual[] best_of_run
Constructor Detail |
public SimpleStatistics()
Method Detail |
public void setup(EvolutionState state, Parameter base)
Setup
setup
in interface Setup
setup
in class Statistics
public void postInitializationStatistics(EvolutionState state)
Statistics
postInitializationStatistics
in class Statistics
public void postEvaluationStatistics(EvolutionState state)
postEvaluationStatistics
in class Statistics
public void finalStatistics(EvolutionState state, int result)
finalStatistics
in class Statistics
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |