|
bool | initialized |
|
bool | useElitism |
|
bool | storeHistory |
|
bool | baiseWeights |
|
UINT | populationSize |
|
UINT | geneSize |
|
UINT | minNumIterationsNoChange |
|
UINT | maxIteration |
|
UINT | storeRate |
|
UINT | bestIndividualIndex |
|
Float | bestIndividualFitness |
|
Float | mutationRate |
|
Float | minChange |
|
Float | baiseCoeff |
|
Random | rand |
|
Vector< INDIVIDUAL > | population |
|
Vector< INDIVIDUAL > | parents |
|
Vector< IndexedDouble > | populationWeights |
|
Vector< Vector< INDIVIDUAL > > | populationHistory |
|
Vector< IndexedDouble > | fitnessHistory |
|
VectorFloat | accumSumLookup |
|
template<typename INDIVIDUAL>
class EvolutionaryAlgorithm< INDIVIDUAL >
Definition at line 41 of file EvolutionaryAlgorithm.h.
template<typename INDIVIDUAL >
Default Constructor, if the populationSize and geneSize parameters are greater than zero then the algorithm will be initialized.
- Parameters
-
populationSize | the number of individuals in the population. Default value = 0 |
geneSize | the number of elements in each individuals gene. Default value = 0 |
Definition at line 51 of file EvolutionaryAlgorithm.h.
template<typename INDIVIDUAL >
template<typename INDIVIDUAL >
This function estimates the populations fitness, based on the training data. It will return a reference to the bestFitness value and the index of the individual with the best fitness.
- Parameters
-
trainingData | a reference to the trainingData that will be used to estimate the fitness |
bestFitness | a reference that will return the best fitness value |
bestIndex | a reference that will return the index of the individual with the best fitness |
- Returns
- returns true if the population fitness was estimated, false otherwise
Definition at line 160 of file EvolutionaryAlgorithm.h.
template<typename INDIVIDUAL >
This function evaluates the fitness of an individual, using the training data. This function assumes that each row in the training data is an example, each column must therefore match the geneSize.
- Parameters
-
individual | a reference to the individual you want to compute the fitness for |
trainingData | a reference to the training data that will be used to compute the individual's fitness |
- Returns
- returns the fitness of the individual
Definition at line 307 of file EvolutionaryAlgorithm.h.
template<typename INDIVIDUAL >
This function evolves the current population, based on the fitness of each individual. You should compute the fitness of each individual first before using this function.
- Returns
- returns true if the population was evolved, false otherwise
Definition at line 196 of file EvolutionaryAlgorithm.h.
template<typename INDIVIDUAL >
virtual bool EvolutionaryAlgorithm< INDIVIDUAL >::initPopulation |
( |
const UINT |
populationSize, |
|
|
const UINT |
geneSize |
|
) |
| |
|
inlinevirtual |
This function initalizes the population, setting each individual's genes to a random value in the range [0.0 1.0]. Both the populationSize and geneSize parameters must be greater than zero.
- Parameters
-
populationSize | the number of individuals in the population |
geneSize | the number of elements in each individuals gene |
- Returns
- returns true if the population was initalized, false otherwise
Definition at line 98 of file EvolutionaryAlgorithm.h.
template<typename INDIVIDUAL >
This operator allows you to directly access each individual in the population. The user must ensure that index is a valid number in the range of [0 populationSize-1].
- Parameters
-
index | the index of the individual you want to access |
- Returns
- returns a reference to the individual in the population at the specific index
Definition at line 86 of file EvolutionaryAlgorithm.h.
The documentation for this class was generated from the following file: