Neural Network Software

com.practicalstudies.neural
Class BackpropagationWeightAdjustment

java.lang.Object
  |
  +--com.practicalstudies.neural.BackpropagationWeightAdjustment
All Implemented Interfaces:
WeightAdjustmentFunction

public class BackpropagationWeightAdjustment
extends java.lang.Object
implements WeightAdjustmentFunction

Encapsulates the function for adjusting connection weights for backpropagation training.

Author:
Michael Wax
See Also:
WeightAdjustmentFunction

Constructor Summary
BackpropagationWeightAdjustment()
          Constructor using a default learning rate of 0.5 and a default momentum coefficient of 0.5.
BackpropagationWeightAdjustment(double learningRate, double momentumCoefficient)
          Constructor using specified learning rate and momentum coefficient values.
 
Method Summary
 void adjustConnectionWeight(WeightedConnection connection)
          Adjusts the weight of a WeightedConnection based on the backpropagation algorithm.
 double getLearningRate()
           
 double getMomentumCoefficient()
           
 void setLearningRate(double learningRate)
          Specify the learning rate.
 void setMomentumCoefficient(double momentumCoefficient)
          Specify the momentum coefficient, which is the fraction of the previous weight change to apply during the current adjustment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackpropagationWeightAdjustment

public BackpropagationWeightAdjustment()
Constructor using a default learning rate of 0.5 and a default momentum coefficient of 0.5.

See Also:
setLearningRate, setMomentumCoefficient

BackpropagationWeightAdjustment

public BackpropagationWeightAdjustment(double learningRate,
                                       double momentumCoefficient)
Constructor using specified learning rate and momentum coefficient values.

See Also:
setLearningRate, setMomentumCoefficient
Method Detail

adjustConnectionWeight

public void adjustConnectionWeight(WeightedConnection connection)
Adjusts the weight of a WeightedConnection based on the backpropagation algorithm.

Specified by:
adjustConnectionWeight in interface WeightAdjustmentFunction

getLearningRate

public double getLearningRate()

setLearningRate

public void setLearningRate(double learningRate)

Specify the learning rate.

A learning rate of one will apply a correction to the connection weight sufficient to offset all of the error in the output of the particular WeightedConnection. However, while large learning rates will lead to rapid network learning, they also exaggerate the influence of local minima, leading to greater oscillations in network output.


getMomentumCoefficient

public double getMomentumCoefficient()

setMomentumCoefficient

public void setMomentumCoefficient(double momentumCoefficient)

Specify the momentum coefficient, which is the fraction of the previous weight change to apply during the current adjustment.

On steep gradients, a positive momentum coefficient will speed learning, but near a minimum it will only lead to oscillations.


PracticalStudies.com