Class ManhattanPropagation

  • All Implemented Interfaces:
    MLTrain, BatchSize, LearningRate, Train, MultiThreadable

    public class ManhattanPropagationextends Propagationimplements LearningRate
    One problem that the backpropagation technique has is that the magnitude of the partial derivative may be calculated too large or too small. The Manhattan update algorithm attempts to solve this by using the partial derivative to only indicate the sign of the update to the weight matrix. The actual amount added or subtracted from the weight matrix is obtained from a simple constant. This constant must be adjusted based on the type of neural network being trained. In general, start with a higher constant and decrease it as needed. The Manhattan update algorithm can be thought of as a simplified version of the resilient algorithm. The resilient algorithm uses more complex techniques to determine the update value.
    • Constructor Detail

      • ManhattanPropagation

        public ManhattanPropagation(ContainsFlat network,                    MLDataSet training,                    double theLearnRate)
        Construct a Manhattan propagation training object.
        network - The network to train.
        training - The training data to use.
        theLearnRate - The learning rate.
    • Method Detail

      • getLearningRate

        public double getLearningRate()
        Specified by:
        getLearningRate in interface LearningRate
        The learning rate that was specified in the constructor.
      • setLearningRate

        public void setLearningRate(double rate)
        Set the learning rate.
        Specified by:
        setLearningRate in interface LearningRate
        rate - The new learning rate.
      • canContinue

        public boolean canContinue()
        This training type does not support training continue.
        Specified by:
        canContinue in interface MLTrain
        Always returns false.
      • pause

        public TrainingContinuation pause()
        This training type does not support training continue.
        Specified by:
        pause in interface MLTrain
        Always returns null.
      • resume

        public void resume(TrainingContinuation state)
        This training type does not support training continue.
        Specified by:
        resume in interface MLTrain
        state - Not used.
      • updateWeight

        public double updateWeight(double[] gradients,                  double[] lastGradient,                  int index)
        Calculate the amount to change the weight by.
        Specified by:
        updateWeight in class Propagation
        gradients - The gradients.
        lastGradient - The last gradients.
        index - The index to update.
        The amount to change the weight by.
      • initOthers

        public void initOthers()
        Perform training method specific init.
        Specified by:
        initOthers in class Propagation
      • setBatchSize

        public void setBatchSize(int theBatchSize)
        Do not allow batch sizes other than 0, not supported.
        Specified by:
        setBatchSize in interface BatchSize
        setBatchSize in class Propagation
        theBatchSize - The batch size.

SCaVis 1.8 ©