Class MaxTrainTimeWithoutImprovement

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, SizeOfHandler, Serializable

    public class MaxTrainTimeWithoutImprovement
    extends AbstractStoppingCriterion
    Stops after the maximum number of seconds since last improvement has been reached.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -max-train <int> (property: maxTrainTime)
        The maximum number of seconds of training time to wait for improvement (
        0 = unlimited time).
        default: 0
        minimum: 0
     
    -min-improvement <double> (property: minimumImprovement)
        The minimum improvement in percent (0-1) to achieve in the alotted time.
        default: 0.0
        minimum: 0.0
        maximum: 1.0
     
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_MaxTrainTime

        protected int m_MaxTrainTime
        the maximum number of seconds to train.
      • m_MinimumImprovement

        protected double m_MinimumImprovement
        the minimum required improvement (percent: 0-1).
      • m_TrainStart

        protected long m_TrainStart
        the time of last improvement.
      • m_LastFitness

        protected Double m_LastFitness
        the last fitness.
    • Constructor Detail

      • MaxTrainTimeWithoutImprovement

        public MaxTrainTimeWithoutImprovement()
    • Method Detail

      • setMaxTrainTime

        public void setMaxTrainTime​(int value)
        Sets the maximum number of seconds to wait for improvement.
        Parameters:
        value - the number of seconds
      • getMaxTrainTime

        public int getMaxTrainTime()
        Returns the maximum number of seconds to wait for improvement.
        Returns:
        the number of seconds
      • maxTrainTimeTipText

        public String maxTrainTimeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setMinimumImprovement

        public void setMinimumImprovement​(double value)
        Sets the minimum improvement in percent (0-1) to achieve in the alotted time.
        Parameters:
        value - the minimum
      • getMinimumImprovement

        public double getMinimumImprovement()
        Returns the minimum improvement in percent (0-1) to achieve in the alotted time.
        Returns:
        the minimum
      • minimumImprovementTipText

        public String minimumImprovementTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • record

        protected void record​(AbstractGeneticAlgorithm genetic)
        Records time and fitness.
        Parameters:
        genetic - the algorithm