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

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

public class TrainFlatNetworkResilient
extends TrainFlatNetworkProp

Train a flat network using RPROP.


Field Summary
 
Fields inherited from class org.encog.neural.flat.train.prop.TrainFlatNetworkProp
currentError, gradients, lastError, network
 
Constructor Summary
TrainFlatNetworkResilient(FlatNetwork flat, MLDataSet trainingSet)
          Tran a network using RPROP.
TrainFlatNetworkResilient(FlatNetwork network, MLDataSet training, double zeroTolerance, double initialUpdate, double maxStep)
          Construct a resilient trainer for flat networks.
 
Method Summary
 RPROPType getRpropType()
           
 double[] getUpdateValues()
           
 void initOthers()
          Perform training method specific init.
 void setRpropType(RPROPType rpropType)
           
 double updateiWeightMinus(double[] gradients, double[] lastGradient, int index)
           
 double updateiWeightPlus(double[] gradients, double[] lastGradient, int index)
           
 double updateWeight(double[] gradients, double[] lastGradient, int index)
          Calculate the amount to change the weight by.
 double updateWeightMinus(double[] gradients, double[] lastGradient, int index)
           
 double updateWeightPlus(double[] gradients, double[] lastGradient, int index)
           
 
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

TrainFlatNetworkResilient

public TrainFlatNetworkResilient(FlatNetwork network,
                                 MLDataSet training,
                                 double zeroTolerance,
                                 double initialUpdate,
                                 double maxStep)
Construct a resilient trainer for flat networks.

Parameters:
network - The network to train.
training - The training data to use.
zeroTolerance - How close a number should be to zero to be counted as zero.
initialUpdate - The initial update value.
maxStep - The maximum step value.

TrainFlatNetworkResilient

public TrainFlatNetworkResilient(FlatNetwork flat,
                                 MLDataSet trainingSet)
Tran a network using RPROP.

Parameters:
flat - The network to train.
trainingSet - The training data to use.
Method Detail

updateWeight

public double updateWeight(double[] gradients,
                           double[] lastGradient,
                           int index)
Calculate the amount to change the weight by.

Specified by:
updateWeight in class TrainFlatNetworkProp
Parameters:
gradients - The gradients.
lastGradient - The last gradients.
index - The index to update.
Returns:
The amount to change the weight by.

updateWeightPlus

public double updateWeightPlus(double[] gradients,
                               double[] lastGradient,
                               int index)

updateWeightMinus

public double updateWeightMinus(double[] gradients,
                                double[] lastGradient,
                                int index)

updateiWeightPlus

public double updateiWeightPlus(double[] gradients,
                                double[] lastGradient,
                                int index)

updateiWeightMinus

public double updateiWeightMinus(double[] gradients,
                                 double[] lastGradient,
                                 int index)

getUpdateValues

public double[] getUpdateValues()
Returns:
The RPROP update values.

getRpropType

public RPROPType getRpropType()
Returns:
the rpropType

setRpropType

public void setRpropType(RPROPType rpropType)
Parameters:
rpropType - the rpropType to set

initOthers

public void initOthers()
Perform training method specific init.

Specified by:
initOthers in class TrainFlatNetworkProp


Copyright © 2011. All Rights Reserved.