|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.ml.train.BasicTraining
org.encog.neural.networks.training.propagation.Propagation
org.encog.neural.networks.training.propagation.quick.QuickPropagation
public class QuickPropagation
QPROP is an efficient training method that is based on Newton's Method. QPROP was introduced in a paper: An Empirical Study of Learning Speed in Back-Propagation Networks" (Scott E. Fahlman, 1988) http://www.heatonresearch.com/wiki/Quickprop
Field Summary | |
---|---|
static String |
LAST_GRADIENTS
Continuation tag for the last gradients. |
Fields inherited from class org.encog.neural.networks.training.propagation.Propagation |
---|
gradients, lastError, network |
Constructor Summary | |
---|---|
QuickPropagation(ContainsFlat network,
MLDataSet training)
Construct a QPROP trainer for flat networks. |
|
QuickPropagation(ContainsFlat network,
MLDataSet training,
double theLearningRate)
Construct a QPROP trainer for flat networks. |
Method Summary | |
---|---|
boolean |
canContinue()
|
double[] |
getLastDelta()
|
double |
getLearningRate()
|
double |
getOutputEpsilon()
|
double |
getShrink()
|
void |
initOthers()
Perform training method specific init. |
boolean |
isValidResume(TrainingContinuation state)
Determine if the specified continuation object is valid to resume with. |
TrainingContinuation |
pause()
Pause the training. |
void |
resume(TrainingContinuation state)
Resume training. |
void |
setBatchSize(int theBatchSize)
Do not allow batch sizes other than 0, not supported. |
void |
setLearningRate(double rate)
Set the learning rate, this is value is essentially a percent. |
void |
setOutputEpsilon(double theOutputEpsilon)
|
void |
setShrink(double s)
|
double |
updateWeight(double[] gradients,
double[] lastGradient,
int index)
Update a weight. |
Methods inherited from class org.encog.neural.networks.training.propagation.Propagation |
---|
calculateGradients, finishTraining, fixFlatSpot, getBatchSize, getCurrentFlatNetwork, getLastGradient, getMethod, getThreadCount, iteration, iteration, learn, learnLimited, report, rollIteration, setErrorFunction, setThreadCount |
Methods inherited from class org.encog.ml.train.BasicTraining |
---|
addStrategy, getError, getImplementationType, getIteration, getStrategies, getTraining, isTrainingDone, postIteration, preIteration, setError, setIteration, setTraining |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.encog.ml.train.MLTrain |
---|
addStrategy, getError, getImplementationType, getIteration, getStrategies, getTraining, isTrainingDone, setError, setIteration |
Field Detail |
---|
public static final String LAST_GRADIENTS
Constructor Detail |
---|
public QuickPropagation(ContainsFlat network, MLDataSet training)
network
- The network to train.training
- The training data.public QuickPropagation(ContainsFlat network, MLDataSet training, double theLearningRate)
network
- The network to train.training
- The training data.theLearningRate
- The learning rate. 2 is a good suggestion as
a learning rate to start with. If it fails to converge,
then drop it. Just like backprop, except QPROP can
take higher learning rates.Method Detail |
---|
public boolean canContinue()
canContinue
in interface MLTrain
public double[] getLastDelta()
public double getLearningRate()
getLearningRate
in interface LearningRate
public boolean isValidResume(TrainingContinuation state)
state
- The continuation object to check.
public TrainingContinuation pause()
pause
in interface MLTrain
public void resume(TrainingContinuation state)
resume
in interface MLTrain
state
- The training state to return to.public void setLearningRate(double rate)
setLearningRate
in interface LearningRate
rate
- The learning rate.public double getOutputEpsilon()
public double getShrink()
public void setShrink(double s)
s
- the shrink to setpublic void setOutputEpsilon(double theOutputEpsilon)
theOutputEpsilon
- the outputEpsilon to setpublic void initOthers()
initOthers
in class Propagation
public double updateWeight(double[] gradients, double[] lastGradient, int index)
updateWeight
in class Propagation
gradients
- The gradients.lastGradient
- The last gradients.index
- The index.
public void setBatchSize(int theBatchSize)
setBatchSize
in interface BatchSize
setBatchSize
in class Propagation
theBatchSize
- The batch size.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |