Documentation of 'org.encog.ml.train.strategy.end.EarlyStoppingStrategy' Java class
EarlyStoppingStrategy
org.encog.ml.train.strategy.end

Class EarlyStoppingStrategy

  • All Implemented Interfaces:
    EndTrainingStrategy, Strategy


    public class EarlyStoppingStrategy
    extends java.lang.Object
    implements EndTrainingStrategy
    A simple early stopping strategy that halts training when the validation set no longer improves.
    • Constructor Detail

      • EarlyStoppingStrategy

        public EarlyStoppingStrategy(MLDataSet theValidationSet)
      • EarlyStoppingStrategy

        public EarlyStoppingStrategy(MLDataSet theValidationSet,
                                     int theCheckFrequency,
                                     int theAllowedStagnantIterations)
    • Method Detail

      • init

        public void init(MLTrain theTrain)
        Initialize this strategy.
        Specified by:
        init in interface Strategy
        Parameters:
        theTrain - The training algorithm.
      • preIteration

        public void preIteration()
        Called just before a training iteration.
        Specified by:
        preIteration in interface Strategy
      • postIteration

        public void postIteration()
        Called just after a training iteration.
        Specified by:
        postIteration in interface Strategy
      • getTrainingError

        public double getTrainingError()
        Returns:
        the trainingError
      • getValidationError

        public double getValidationError()
        Returns:
        The validation error.
      • getStagnantIterations

        public int getStagnantIterations()
      • setStagnantIterations

        public void setStagnantIterations(int stagnantIterations)
      • getAllowedStagnantIterations

        public int getAllowedStagnantIterations()
      • setAllowedStagnantIterations

        public void setAllowedStagnantIterations(int allowedStagnantIterations)
      • isSaveBest

        public boolean isSaveBest()
      • setSaveBest

        public void setSaveBest(boolean saveBest)
      • getBestValidationError

        public double getBestValidationError()
      • getMinimumImprovement

        public double getMinimumImprovement()
      • setMinimumImprovement

        public void setMinimumImprovement(double minimumImprovement)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.