geneticWedge.gp
Class AbstractPopulation

java.lang.Object
  extended by geneticWedge.gp.AbstractPopulation
Direct Known Subclasses:
Population

public abstract class AbstractPopulation
extends java.lang.Object

AbstractPopulation is the parent of all Population objects. It contains only the most basic functions and defines additional abstract functions that must be implemented by any subclass.


Nested Class Summary
static class AbstractPopulation.FitnessFunction
          The FitnessFunction is used to select Individuals from a Population for breeding.
static class AbstractPopulation.SelectionMethod
          SelectionMethod determines how Individuals are selected for breeding.
 
Field Summary
protected  double[] allFitnesses
          An array containing the (training) fitnesses of all Individuals in this Population
protected  int aurocSampleSize
          The number of points used to estimate the AUROC (and AOREC).
protected  double averageTrainFitness
          The average (mean) training fitness of all members of the population
protected  double averageValidationFitness
          The average (mean) validation fitness of all members of the population
protected  int bestIndex
          The index of the Individual with the best (training) fitnesses
protected  double bestTrainFitness
          The best training fitness obtained by any member of the current population
protected  double bestTrainFitnessSoFar
          The best validation fitness obtained by any member of the current population in any generation so far
protected  double bestValidationFitness
          The best validation fitness obtained by any member of the current population
protected  double bestValidationFitnessSoFar
          The best training fitness obtained by any member of the current population in any generation so far
protected  AbstractPopulation.FitnessFunction fitnessFunction
          The FitnessFunction used to evaluate Individuals.
protected  int generationNumber
          The number of generations of evolution that have occurred
protected  int maxGenerations
          The maximum number of generations of evolution that may occur
protected  PopulationDescriptor popDescriptor
          The PopulationDescriptor that describes this Population
protected  int popSize
          The current population size.
protected  AbstractPopulation.FitnessFunction recFitnessFunction
          The FitnessFunction used to evaluate the AOREC.
protected  int startingPopSize
          The starting population size.
protected  int tournamentSize
          The size of the tournament used during tournament selection.
 
Constructor Summary
AbstractPopulation()
           
 
Method Summary
 int getAUROCSampleSize()
          AUROC sample size is also used for REC curves and Combined Classification Error.
abstract  double getAverageTrainingFitness()
          Returns the average fitness of all Individuals on the training data.
abstract  double getAverageValidationFitness()
          Returns the average fitness of all Individuals on the validation data.
abstract  double getBestTrainingFitness()
          Returns the fitness of the best Individual on the training data.
abstract  double getBestValidationFitness()
          Returns the fitness of the best Individual on the validation data.
 int getGenerationNumber()
          Returns the number of generations of evolution that have occurred.
 int getInitialPopulationSize()
          Returns the initial population size.
 int getMaxGenerations()
          Returns the maximum number of generations for which the population may evolve.
 PopulationDescriptor getPopulationDescriptor()
          Returns a Population Descriptor object, which holds information concerning the Population as a whole.
 int getPopulationSize()
          Returns the current population size.
 AbstractPopulation.FitnessFunction getRECFitnessFunction()
          Returns the FitnessFunction to be used when constructing a REC curve.
 int getTournamentSize()
          Returns the tournament size to be used during tournament selection.
 void setAUROCSampleSize(int sampleSize)
          AUROC sample size is also used for REC curves and Combined Classification Error.
 void setMaxGenerations(int maxGenerations)
          Sets the maximum number of generations for which the population may evolve.
 void setRECFitnessFunction(AbstractPopulation.FitnessFunction recFunction)
          Sets the FitnessFunction to be used when constructing a REC curve.
 void setTournamentSize(int tournamentSize)
          Sets the size of the tournament to be used in tournament selection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allFitnesses

protected double[] allFitnesses
An array containing the (training) fitnesses of all Individuals in this Population


bestIndex

protected int bestIndex
The index of the Individual with the best (training) fitnesses


averageTrainFitness

protected double averageTrainFitness
The average (mean) training fitness of all members of the population


bestTrainFitness

protected double bestTrainFitness
The best training fitness obtained by any member of the current population


averageValidationFitness

protected double averageValidationFitness
The average (mean) validation fitness of all members of the population


bestValidationFitness

protected double bestValidationFitness
The best validation fitness obtained by any member of the current population


generationNumber

protected int generationNumber
The number of generations of evolution that have occurred


maxGenerations

protected int maxGenerations
The maximum number of generations of evolution that may occur


bestValidationFitnessSoFar

protected double bestValidationFitnessSoFar
The best training fitness obtained by any member of the current population in any generation so far


bestTrainFitnessSoFar

protected double bestTrainFitnessSoFar
The best validation fitness obtained by any member of the current population in any generation so far


startingPopSize

protected int startingPopSize
The starting population size. Usually the population size stays constant. However, if a performanceFunction is used and non-dominated Individuals are removed the population size may vary.


popSize

protected int popSize
The current population size. Usually the population size stays constant. However, if a performanceFunction is used and non-dominated Individuals are removed the population size may vary.


tournamentSize

protected int tournamentSize
The size of the tournament used during tournament selection. The default tournament size is 4.


popDescriptor

protected PopulationDescriptor popDescriptor
The PopulationDescriptor that describes this Population


fitnessFunction

protected AbstractPopulation.FitnessFunction fitnessFunction
The FitnessFunction used to evaluate Individuals. The default is MSE.


aurocSampleSize

protected int aurocSampleSize
The number of points used to estimate the AUROC (and AOREC). Default is 100.


recFitnessFunction

protected AbstractPopulation.FitnessFunction recFitnessFunction
The FitnessFunction used to evaluate the AOREC. Fefault is MSE.

Constructor Detail

AbstractPopulation

public AbstractPopulation()
Method Detail

getBestTrainingFitness

public abstract double getBestTrainingFitness()
Returns the fitness of the best Individual on the training data.


getBestValidationFitness

public abstract double getBestValidationFitness()
Returns the fitness of the best Individual on the validation data.


getAverageTrainingFitness

public abstract double getAverageTrainingFitness()
Returns the average fitness of all Individuals on the training data.


getAverageValidationFitness

public abstract double getAverageValidationFitness()
Returns the average fitness of all Individuals on the validation data.


getGenerationNumber

public int getGenerationNumber()
Returns the number of generations of evolution that have occurred.


getInitialPopulationSize

public int getInitialPopulationSize()
Returns the initial population size. In most cases the population size is constant. It may vary if a performance function is used and dominated Individuals are removed from the Population.


getPopulationSize

public int getPopulationSize()
Returns the current population size.


setMaxGenerations

public void setMaxGenerations(int maxGenerations)
Sets the maximum number of generations for which the population may evolve.


getMaxGenerations

public int getMaxGenerations()
Returns the maximum number of generations for which the population may evolve.


setTournamentSize

public void setTournamentSize(int tournamentSize)
Sets the size of the tournament to be used in tournament selection. A large tournament size will lead to a quicker loss in diversity, i.e. faster convergence. A tournament size less than 1 or greater than or equal to the population size will not be set.


getTournamentSize

public int getTournamentSize()
Returns the tournament size to be used during tournament selection.


getPopulationDescriptor

public PopulationDescriptor getPopulationDescriptor()
Returns a Population Descriptor object, which holds information concerning the Population as a whole.


setAUROCSampleSize

public void setAUROCSampleSize(int sampleSize)
AUROC sample size is also used for REC curves and Combined Classification Error.


getAUROCSampleSize

public int getAUROCSampleSize()
AUROC sample size is also used for REC curves and Combined Classification Error.


setRECFitnessFunction

public void setRECFitnessFunction(AbstractPopulation.FitnessFunction recFunction)
Sets the FitnessFunction to be used when constructing a REC curve.


getRECFitnessFunction

public AbstractPopulation.FitnessFunction getRECFitnessFunction()
Returns the FitnessFunction to be used when constructing a REC curve.