class StatisticsA

Abstract statistics class

Public Methods

virtual void CollectBasicRunStatistics ( bool iIsSucces, FitnessType const & iBestFitness )
Collecting statistics
virtual unsigned long int GetNumberOfEvaluations ()
Collecting statistics
virtual void ResetRunStatistics ()
Reseting statistics

Public

Registering Evaluations
Collecting statistics
virtual void RegisterEvaluation ()
Single evaluation.
virtual void RegisterEvaluations ( unsigned long int iEvaluations )
Multiple evaluations,

Protected Fields

unsigned long int NumberOfEvaluations
Number of evaluations this run.
double TotalFitness
Total of best fitnesses this run.
unsigned long int TotalNumberOfEvaluations
Number of evaluations over all runs.
unsigned long int TotalSuccess
Total number of successes this run.

Documentation

Abstract base class defining the basic statistical data to be collected during experiments. These consist of SuccessRate (SR), Average Evaluations to Solution (AES) and Mean Fitness (MF).

virtual void ResetRunStatistics()
Example:
Statistics.ResetRunStatistics();
// Do some runs of the evolutionary algorithm on a problem.
cout << Statistics;
Call this to reset all the statistics that are used to collect data during runs.

Returns:
Nothing.
Author:
J.I. van Hemert
Version:
0.1

virtual void CollectBasicRunStatistics( bool iIsSucces, FitnessType const & iBestFitness )
Example:
Statistics.ResetRunStatistics();
for (runs = 0; runs < 10; ++runs)
{
// Run the evolutionary algorithm.
Statistics.CollectBasicRunStatistics(SolutionFound, BestIndividual->GetFitness());
}
cout << Statistics;
After every run this function should be called to record the result of the last run.

Returns:
Nothing.
Parameters:
iSuccess - Set this to true if the last run found a solution.
iBestFitness - This should be the fitness of the best individual in population after the last run.
Author:
J.I. van Hemert
Version:
0.1

Registering Evaluations

Example:
FitnessFunction::Calculate();
{
// Calculate the fitness of some genome using its data.
Statistics.RegisterEvaluation();
}
cout << Statistics;
These functions are used to register the amount of evaluations made by the fitnessfunction.

Returns:
Nothing.
Parameters:
iEvaluations - Number of evaluations made, only needed when you want to register a number of evaluations in one single command.
Author:
J.I. van Hemert
Version:
0.1
See Also:
FitnessFunctionA

virtual void RegisterEvaluation()
Single evaluation.

virtual void RegisterEvaluations( unsigned long int iEvaluations )
Multiple evaluations,

virtual unsigned long int GetNumberOfEvaluations()
This function can be used in combination with the StopCondition. When a maximum number of evaluations is allowed, StopCondition can be used to terminate the current run when this number is reached.

Returns:
The number of evaluation done this run so far.
Author:
J.I. van Hemert
Version:
0.1
See Also:
StopConditionA

double TotalFitness
Total of best fitnesses this run.

unsigned long int TotalSuccess
Total number of successes this run.

unsigned long int NumberOfEvaluations
Number of evaluations this run.

unsigned long int TotalNumberOfEvaluations
Number of evaluations over all runs.


This class has no child classes.
Author:
J.I. van Hemert
Version:
0.1

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de