org.encog.neural.flat.train.prop
Class TrainFlatNetworkBackPropagation

java.lang.Object
  extended by org.encog.neural.flat.train.prop.TrainFlatNetworkProp
      extended by org.encog.neural.flat.train.prop.TrainFlatNetworkBackPropagation
All Implemented Interfaces:
TrainFlatNetwork

public class TrainFlatNetworkBackPropagation
extends TrainFlatNetworkProp

Train a flat network, using backpropagation.


Field Summary
 
Fields inherited from class org.encog.neural.flat.train.prop.TrainFlatNetworkProp
currentError, gradients, lastError, network
 
Constructor Summary
TrainFlatNetworkBackPropagation(FlatNetwork network, MLDataSet training, double theLearningRate, double theMomentum)
          Construct a backprop trainer for flat networks.
 
Method Summary
 double[] getLastDelta()
           
 double getLearningRate()
           
 double getMomentum()
           
 void initOthers()
          Perform training method specific init.
 void setLastDelta(double[] ds)
          Set the last delta.
 void setLearningRate(double rate)
          Set the learning rate.
 void setMomentum(double rate)
          Set the momentum.
 double updateWeight(double[] gradients, double[] lastGradient, int index)
          Update a weight.
 
Methods inherited from class org.encog.neural.flat.train.prop.TrainFlatNetworkProp
calculateGradients, finishTraining, fixFlatSpot, getError, getErrorFunction, getIteration, getLastGradient, getNetwork, getNumThreads, getTraining, iteration, iteration, learn, learnLimited, report, setErrorFunction, setIteration, setNumThreads
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrainFlatNetworkBackPropagation

public TrainFlatNetworkBackPropagation(FlatNetwork network,
                                       MLDataSet training,
                                       double theLearningRate,
                                       double theMomentum)
Construct a backprop trainer for flat networks.

Parameters:
network - The network to train.
training - The training data.
theLearningRate - The learning rate.
theMomentum - The momentum.
Method Detail

getLastDelta

public final double[] getLastDelta()
Returns:
The last deltas.

getLearningRate

public final double getLearningRate()
Returns:
the learningRate

getMomentum

public final double getMomentum()
Returns:
the momentum

setLastDelta

public final void setLastDelta(double[] ds)
Set the last delta.

Parameters:
ds - The last delta.

setLearningRate

public final void setLearningRate(double rate)
Set the learning rate.

Parameters:
rate - The learning rate.

setMomentum

public final void setMomentum(double rate)
Set the momentum.

Parameters:
rate - The momentum.

updateWeight

public final double updateWeight(double[] gradients,
                                 double[] lastGradient,
                                 int index)
Update a weight.

Specified by:
updateWeight in class TrainFlatNetworkProp
Parameters:
gradients - The gradients.
lastGradient - The last gradients.
index - The index.
Returns:
The weight delta.

initOthers

public void initOthers()
Perform training method specific init.

Specified by:
initOthers in class TrainFlatNetworkProp


Copyright © 2011. All Rights Reserved.