geneticWedge.gp
Class FitnessStoppingCriterion

java.lang.Object
  extended by geneticWedge.gp.StoppingCriterion
      extended by geneticWedge.gp.EvaluativeStoppingCriterion
          extended by geneticWedge.gp.FitnessStoppingCriterion

public class FitnessStoppingCriterion
extends EvaluativeStoppingCriterion

A FitnessStoppingCriterion stops evolution based on some property of the FitnessFunction.


Constructor Summary
FitnessStoppingCriterion(double fitnessValue, boolean averageValues, boolean useValidationData)
          Default constructor
 
Method Summary
 boolean stopReached(AbstractPopulation pop)
          Will return true only if the stop criterion has been reached.
 java.lang.String toString()
          Returns a string representation of this FitnessStoppingCriterion.
 
Methods inherited from class geneticWedge.gp.EvaluativeStoppingCriterion
setMaximise, usesValidation
 
Methods inherited from class geneticWedge.gp.StoppingCriterion
stopIfNoDiversity, stopIfNoDiversity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FitnessStoppingCriterion

public FitnessStoppingCriterion(double fitnessValue,
                                boolean averageValues,
                                boolean useValidationData)
Default constructor

Parameters:
fitnessValue - The target fitness. Once this value is reached evolution will be stopped.
averageValues - If true, the average value of the fitness across the whole population will be compared against the target value. If false, the value of the best member of the population will be used.
useValidationData - If true, fitness values on the validation data will be used to assess whether a stop should occur. If false, training data will be used.
Method Detail

stopReached

public boolean stopReached(AbstractPopulation pop)
Will return true only if the stop criterion has been reached.

Specified by:
stopReached in class StoppingCriterion

toString

public java.lang.String toString()
Returns a string representation of this FitnessStoppingCriterion. This is useful for generating results files containing information about a GP run.

Specified by:
toString in class StoppingCriterion