org.encog.neural.flat.train.prop
Class TrainFlatNetworkManhattan
java.lang.Object
org.encog.neural.flat.train.prop.TrainFlatNetworkProp
org.encog.neural.flat.train.prop.TrainFlatNetworkManhattan
- All Implemented Interfaces:
- TrainFlatNetwork
public class TrainFlatNetworkManhattan
- extends TrainFlatNetworkProp
Train the flat network using Manhattan update rule.
|
Method Summary |
double |
getLearningRate()
|
void |
initOthers()
Perform training method specific init. |
void |
setLearningRate(double theLearningRate)
|
double |
updateWeight(double[] gradients,
double[] lastGradient,
int index)
Calculate the amount to change the weight by. |
| 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 |
TrainFlatNetworkManhattan
public TrainFlatNetworkManhattan(FlatNetwork network,
MLDataSet training,
double theLearningRate)
- Construct a trainer for flat networks to use the Manhattan update rule.
- Parameters:
network - The network to train.training - The training data to use.theLearningRate - The learning rate to use.
getLearningRate
public final double getLearningRate()
- Returns:
- the learningRate
setLearningRate
public final void setLearningRate(double theLearningRate)
- Parameters:
theLearningRate - the learningRate to set
updateWeight
public final 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.
initOthers
public void initOthers()
- Perform training method specific init.
- Specified by:
initOthers in class TrainFlatNetworkProp
Copyright © 2011. All Rights Reserved.