GLStatisticsSimple Class Reference

#include <GLStatisticsSimple.h>

Inheritance diagram for GLStatisticsSimple:

GLStatisticsSingleObjective

List of all members.

Public Member Functions

 GLStatisticsSimple (const vector< GLBaseGaStatus * > &results)
virtual ~GLStatisticsSimple ()
int getNumberOfRuns ()
const pair< long, long > & getMinMaxEvaluatorCalls () const
const pair< int, int > & getMinMaxGenerationsToFindBest () const
const pair< int, int > & getMinMaxGenerationsToFindAllBests () const
const pair< int, int > & getMinMaxNumberOfGenerations () const
const pair< double, double > & getStatEvaluatorCalls () const
const pair< double, double > & getStatGenerationsToFindBest () const
const pair< double, double > & getStatGenerationsToFindAllBests () const
const pair< double, double > & getStatNumberOfGenerations () const
virtual ostream & toStream (ostream &out) const


Detailed Description

Class to calculate and print the statistics about multiple GA runs. This class does not do results-related statistics (e.g. average resulting value of the objective function) as it would normally depend on type of objective function -- single or multiple objective etc. However, it will collect and print other statistics -- average number of evaluator calls, number of generations per run etc. Note, that this class may refer to data from results set (e.g. best organisms etc.) so it is valid until the results set is destroyed.

Definition at line 20 of file GLStatisticsSimple.h.


Constructor & Destructor Documentation

GLStatisticsSimple::GLStatisticsSimple ( const vector< GLBaseGaStatus * > &  results  ) 

Constructor. Collects all the relevant statistics from the vector of results. Vector should contains the results of multiple runs of the GA with the same parameters. This class collects only GA-run related statistics (e.g. number of generations per run) and not results statistics (e.g. average/best fittness value etc.).

Parameters:
results vector of results of GA runs.

Definition at line 18 of file GLStatisticsSimple.cpp.

GLStatisticsSimple::~GLStatisticsSimple (  )  [virtual]

Simple destructor.

Definition at line 41 of file GLStatisticsSimple.cpp.


Member Function Documentation

const pair<long, long>& GLStatisticsSimple::getMinMaxEvaluatorCalls (  )  const [inline]

Returns the minimum and maximum of number of evaluator calls over provided sample of results.

Returns:
minimum (first) and maximum (second) of number of evaluator calls.

Definition at line 51 of file GLStatisticsSimple.h.

const pair<int, int>& GLStatisticsSimple::getMinMaxGenerationsToFindAllBests (  )  const [inline]

Returns minimum and maximum (over sample of runs provided) of number of generations required to find all the bests solutions for each run. E.g. for single objective oprimization -- when the set of different organisms but with the same fitness function was last amended. For multiple objective optimization -- when the Pareto set was last time modified.

Returns:
minimum (first) and maximum (second) of number of generations to find all best solutions.

Definition at line 74 of file GLStatisticsSimple.h.

const pair<int, int>& GLStatisticsSimple::getMinMaxGenerationsToFindBest (  )  const [inline]

Returns the minimum and maximum of number of generations required to find best solution for each run (not necessarily THE best solution for the problem or even among all results).

Returns:
minimum (first) and maximum (second) of number generations required to find the best solution.

Definition at line 61 of file GLStatisticsSimple.h.

const pair<int, int>& GLStatisticsSimple::getMinMaxNumberOfGenerations (  )  const [inline]

Returns minimum and maximum (over sample of runs provided) of number of generations made during each GA run (may vary depending on stoppage criteria).

Returns:
minimum (first) and maximum (second) of number of generations during each GA run.

Definition at line 84 of file GLStatisticsSimple.h.

int GLStatisticsSimple::getNumberOfRuns (  )  [inline]

Return number of runs over which statistics was collected.

Returns:
number of runs over which statistics was collected.

Definition at line 42 of file GLStatisticsSimple.h.

const pair<double, double>& GLStatisticsSimple::getStatEvaluatorCalls (  )  const [inline]

Returns the statistics (average and standard deviation) of number of evaluator calls calculated on provided sample of results.

Returns:
average (first) and standard deviation (second) of number of evaluator calls.

Definition at line 93 of file GLStatisticsSimple.h.

const pair<double, double>& GLStatisticsSimple::getStatGenerationsToFindAllBests (  )  const [inline]

Returns the statistics (average and standard deviation) of number of generations required to find all the bests solutions for each run. E.g. for single objective oprimization -- when the set of different organisms but with the same fitness function was last amended. For multiple objective optimization -- when the Pareto set was last time modified.

Returns:
average (first) and standard deviation (second) of number of generations to find all best solutions.

Definition at line 117 of file GLStatisticsSimple.h.

const pair<double, double>& GLStatisticsSimple::getStatGenerationsToFindBest (  )  const [inline]

Returns the statistics (average and standard deviation) of number of generations required to find best solution for each run (not necessarily THE best solution for the problem or even among all results).

Returns:
average (first) and standard deviation (second) of number of evaluator calls.

Definition at line 104 of file GLStatisticsSimple.h.

const pair<double, double>& GLStatisticsSimple::getStatNumberOfGenerations (  )  const [inline]

Returns the statistics (average and standard deviation) of number of generations made during each GA run (may vary depending on stoppage criteria).

Returns:
average (first) and standard deviation (second) of number of generations during each GA run.

Definition at line 127 of file GLStatisticsSimple.h.

ostream & GLStatisticsSimple::toStream ( ostream &  out  )  const [virtual]

Prints the statistics.

Collect and prints the statistics from the matrix of results. Each row corresponds to GA with different parameters and contains the results of multiple runs of the this GA. Header is the title of each of the experiments (each header corresponds to row of the matrix of results). Implementation in this class prints only GA-run related statistics (e.g. number of generations per run) and not results statistics (e.g. average of the fittness function).

Parameters:
results matrix of results of GA runs.
headers header for each set of results.

Reimplemented in GLStatisticsSingleObjective.

Definition at line 199 of file GLStatisticsSimple.cpp.


The documentation for this class was generated from the following files:

Generated on Sat Jun 13 13:58:12 2009 for GenLib by  doxygen 1.5.9