|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectgeneticWedge.gp.StoppingCriterion
geneticWedge.gp.EvaluativeStoppingCriterion
geneticWedge.gp.StagnationStoppingCriterion
public class StagnationStoppingCriterion
StagnationStoppingCriterion stops evolution if no improvement in some measure of Fitness has occurred for some time. The 'patience' of the stopping method (the allowed number of generations without improvement) may be set, as may the value against which to assess improvement: training or validation error; best or averaged value. Note: if both useValidationData and useTrainingData are true, the average of the training and validation fitnesses will be used. If both useValidationData and useTrainingData are false, the training fitness will be used.
Constructor Summary | |
---|---|
StagnationStoppingCriterion(int patienceParameter,
boolean averageValues,
boolean useValidationData)
StagnationStoppingCriterion constructor. |
|
StagnationStoppingCriterion(int patienceParameter,
boolean averageValues,
boolean useTrainingData,
boolean useValidationData)
StagnationStoppingCriterion constructor. |
Method Summary | |
---|---|
boolean |
lastGenerationWasImproved()
Returns true if there was an improvment in evaluation function during creation of the last generation. |
boolean |
stopReached(AbstractPopulation pop)
Returns true if the stopping condition has been reached (no improvement in evaluation function for a fixed number of generations). |
java.lang.String |
toString()
Returns a String representation of this StagnationStoppingCriterion. |
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 |
---|
public StagnationStoppingCriterion(int patienceParameter, boolean averageValues, boolean useValidationData)
patienceParameter
- The number of generations that are allowed without any improvement. If set to 0,
evolution will stop as soon as there is no improvement. Otherwise, the Population will be restored to its
state at the optimum value after evolution has been stopped.averageValues
- If true, improvement in average fitness will be used as a stopping criterion, otherwise improvement in best value will be used.useValidationData
- If true, improvement will be assessed against fitnesses on the validation data, otherwise against fitnesses on the training data.public StagnationStoppingCriterion(int patienceParameter, boolean averageValues, boolean useTrainingData, boolean useValidationData)
patienceParameter
- The number of generations that are allowed without any improvement. If set to 0,
evolution will stop as soon as there is no improvement. Otherwise, the Population will be restored to its
state at the optimum value after evolution has been stopped.averageValues
- If true, improvement in average fitness will be used as a stopping criterion, otherwise improvement in best value will be used.useValidationData
- If true, improvement will be assessed against fitnesses on the validation data.
Note: if both useValidationData and useTrainingData are true, the average of the training and validation fitnesses will be used.useTrainingData
- If true, improvement will be assessed against fitnesses on the training data.
Note: if both useValidationData and useTrainingData are true, the average of the training and validation fitnesses will be used.Method Detail |
---|
public boolean stopReached(AbstractPopulation pop)
stopReached
in class StoppingCriterion
public java.lang.String toString()
toString
in class StoppingCriterion
public boolean lastGenerationWasImproved()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |