Documentation of 'org.encog.ml.train.strategy.HybridStrategy' Java class
HybridStrategy
org.encog.ml.train.strategy

Class HybridStrategy

  • All Implemented Interfaces:
    Strategy


    public class HybridStrategy
    extends java.lang.Object
    implements Strategy
    A hybrid stragey allows a secondary training algorithm to be used. Once the primary algorithm is no longer improving by much, the secondary will be used. Using simulated annealing in as a secondary to one of the propagation methods is often a very efficient combination as it can help the propagation method escape a local minimum. This is particularly true with backpropagation.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int DEFAULT_ALTERNATE_CYCLES
      The default number of cycles to use the alternate training for.
      static double DEFAULT_MIN_IMPROVEMENT
      The default minimum improvement before we switch to the alternate training method.
      static int DEFAULT_TOLERATE_CYCLES
      The default number of cycles to tolerate bad improvement for.
    • Constructor Summary

      Constructors 
      Constructor and Description
      HybridStrategy(MLTrain altTrain)
      Construct a hybrid strategy with the default minimum improvement and toleration cycles.
      HybridStrategy(MLTrain altTrain, double minImprovement, int tolerateMinImprovement, int alternateCycles)
      Create a hybrid strategy.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void init(MLTrain train)
      Initialize this strategy.
      void postIteration()
      Called just after a training iteration.
      void preIteration()
      Called just before a training iteration.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_MIN_IMPROVEMENT

        public static final double DEFAULT_MIN_IMPROVEMENT
        The default minimum improvement before we switch to the alternate training method.
        See Also:
        Constant Field Values
      • DEFAULT_TOLERATE_CYCLES

        public static final int DEFAULT_TOLERATE_CYCLES
        The default number of cycles to tolerate bad improvement for.
        See Also:
        Constant Field Values
      • DEFAULT_ALTERNATE_CYCLES

        public static final int DEFAULT_ALTERNATE_CYCLES
        The default number of cycles to use the alternate training for.
        See Also:
        Constant Field Values
    • Constructor Detail

      • HybridStrategy

        public HybridStrategy(MLTrain altTrain)
        Construct a hybrid strategy with the default minimum improvement and toleration cycles.
        Parameters:
        altTrain - The alternative training strategy.
      • HybridStrategy

        public HybridStrategy(MLTrain altTrain,
                              double minImprovement,
                              int tolerateMinImprovement,
                              int alternateCycles)
        Create a hybrid strategy.
        Parameters:
        altTrain - The alternate training algorithm.
        minImprovement - The minimum improvement to switch algorithms.
        tolerateMinImprovement - The number of cycles to tolerate the minimum improvement for.
        alternateCycles - How many cycles should the alternate training algorithm be used for.
    • Method Detail

      • init

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

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

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

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.