The Encog Project

org.encog.neural.networks.training.backpropagation
Class BackpropagationLayer

java.lang.Object
  extended by org.encog.neural.networks.training.backpropagation.BackpropagationLayer

public class BackpropagationLayer
extends java.lang.Object

BackpropagationLayer: The back propagation training algorithm requires training data to be stored for each of the layers. The Backpropagation class creates a BackpropagationLayer object for each of the layers in the neural network that it is training.


Constructor Summary
BackpropagationLayer(Backpropagation backpropagation, FeedforwardLayer layer)
          Construct a BackpropagationLayer object that corresponds to a specific neuron layer.
 
Method Summary
 void accumulateMatrixDelta(int i1, int i2, double value)
          Accumulate a matrix delta.
 void accumulateThresholdDelta(int index, double value)
          Accumulate a threshold delta.
 void calcError()
          Calculate the current error.
 void calcError(NeuralData ideal)
          Calculate the error for the given ideal values.
 void clearError()
          Clear any error values.
 double getError(int index)
          Get the error for the specified neuron.
 double getErrorDelta(int index)
          Get the error delta for the specified neuron.
 void learn(double learnRate, double momentum)
          Learn from the last error calculation.
 void setError(int index, double e)
          Set the error for the specified neuron.
 void setErrorDelta(int index, double d)
          Set the error delta for the specified neuron.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackpropagationLayer

public BackpropagationLayer(Backpropagation backpropagation,
                            FeedforwardLayer layer)
Construct a BackpropagationLayer object that corresponds to a specific neuron layer.

Parameters:
backpropagation - The back propagation training object.
layer - The layer that this object corresponds to.
Method Detail

accumulateMatrixDelta

public void accumulateMatrixDelta(int i1,
                                  int i2,
                                  double value)
Accumulate a matrix delta.

Parameters:
i1 - The matrix row.
i2 - The matrix column.
value - The delta value.

accumulateThresholdDelta

public void accumulateThresholdDelta(int index,
                                     double value)
Accumulate a threshold delta.

Parameters:
index - The threshold index.
value - The threshold value.

calcError

public void calcError()
Calculate the current error.


calcError

public void calcError(NeuralData ideal)
Calculate the error for the given ideal values.

Parameters:
ideal - Ideal output values.

clearError

public void clearError()
Clear any error values.


getError

public double getError(int index)
Get the error for the specified neuron.

Parameters:
index - The index for the specified neuron.
Returns:
The error for the specified neuron.

getErrorDelta

public double getErrorDelta(int index)
Get the error delta for the specified neuron.

Parameters:
index - The specified neuron.
Returns:
The error delta.

learn

public void learn(double learnRate,
                  double momentum)
Learn from the last error calculation.

Parameters:
learnRate - The learning rate.
momentum - The momentum.

setError

public void setError(int index,
                     double e)
Set the error for the specified neuron.

Parameters:
index - The specified neuron.
e - The error value.

setErrorDelta

public void setErrorDelta(int index,
                          double d)
Set the error delta for the specified neuron.

Parameters:
index - The specified neuron.
d - The error delta.

The Encog Project