Documentation of 'jhpro.nnet.BackpropagationNet' Java class
BackpropagationNet
jhpro.nnet

Class BackpropagationNet

  • All Implemented Interfaces:
    java.io.Serializable


    public class BackpropagationNet
    extends java.lang.Object
    Backpropagation is a supervised learning algorithm and is mainly used by Multi-Layer-Perceptrons to change the weights connected to the net's hidden neuron layer(s). The backpropagation algorithm uses a computed output error to change the weight values in backward direction. To get this net error, a forwardpropagation phase must have been done before. While propagating in forward direction, the neurons are being activated using the sigmoid activation function.
    See Also:
    Serialized Form
    • Constructor Detail

      • BackpropagationNet

        public BackpropagationNet()
        Construct Backpropagation.
    • Method Detail

      • addNeuronLayer

        public void addNeuronLayer(int i)
        Adds a neuron layer with size neurons. Note that neuron layers are sequentially added to the net.
        Parameters:
        i -
      • connectLayers

        public void connectLayers()
        Connects all neuron layers with weight matrices. Must be called after all neuron layers have been added.
      • setMinimumError

        public void setMinimumError(double d)
        Sets the minimum error of a neural net.
        Parameters:
        d -
      • getMinimumError

        public double getMinimumError()
        Returns the minimum error of a neural net.
      • setAccuracy

        public void setAccuracy(double d)
        Sets the accuracy value.
        Parameters:
        d -
      • getAccuracy

        public double getAccuracy()
        Returns the accuracy value.
        Returns:
      • getWeightValues

        public float[][] getWeightValues(int i)
        Returns the weight values of weight matrix matrixNr. The values for matrixNr start with zero!
        Parameters:
        i -
        Returns:
      • getNeuronOutputs

        public float[] getNeuronOutputs(int i)
        Returns the output values of all neurons in layer i
        Parameters:
        i - layer
        Returns:
      • getNumberOfLayers

        public int getNumberOfLayers()
      • getNumberOfNeurons

        public int getNumberOfNeurons(int i)
      • getNumberOfWeights

        public int getNumberOfWeights()
      • getNumberOfWeights

        public int getNumberOfWeights(int i)
      • getNumberOfPatterns

        public int getNumberOfPatterns()
      • getInputPattern

        public java.lang.String getInputPattern(int i)
      • getTargetPattern

        public java.lang.String getTargetPattern(int i)
        Returns the target pattern with number patternNr.
        Parameters:
        i -
        Returns:
      • getOutputPattern

        public java.lang.String getOutputPattern(int i)
        Returns the output pattern with number patternNr.
        Parameters:
        i -
        Returns:
      • getPatternError

        public float getPatternError(int i)
        Returns the error of output pattern patternNr.
        Parameters:
        i -
        Returns:
      • getError

        public double getError()
        Returns the current error of the net.
        Returns:
      • learn

        public void learn()
        Performs one learning step.
      • recall

        public java.lang.String recall(java.lang.String s)
        Tries to recall the correct output for a learned input pattern recallInput.
        Parameters:
        s -
        Returns:
      • readConversionFile

        public void readConversionFile(java.lang.String s)
        Reads a conversion table for ASCII-binary values from file conversionFileName.
        Parameters:
        s -
      • getAsciiValue

        public java.lang.String getAsciiValue(java.lang.String s)
      • readPatternFile

        public void readPatternFile(java.lang.String s)
      • finishedLearning

        public boolean finishedLearning()
      • error

        public void error(int i)
      • square

        public double square(double d)
      • setLearningRate

        public void setLearningRate(double d)
      • getLearningRate

        public double getLearningRate()
        Returns the current learning rate of the net.
        Returns:
      • setDisplayStep

        public void setDisplayStep(int i)
      • displayNow

        public boolean displayNow()
      • resetTime

        public void resetTime()
      • getElapsedTime

        public java.lang.String getElapsedTime()
        Returns the time that elapsed since the learning process started.
        Returns:
      • setMaxLearningCycles

        public void setMaxLearningCycles(int i)
        Sets the maximum number of learning cycles to x. The default value is -1 (no maximum).
        Parameters:
        i -
      • getMaxLearningCycles

        public int getMaxLearningCycles()
      • incLearningCycle

        public void incLearningCycle()
      • getLearningCycle

        public int getLearningCycle()
        Returns the current learning cycle of the net.
        Returns:

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.