org.encog.neural.networks.training.propagation.quick
Class QuickPropagation

java.lang.Object
  extended by org.encog.ml.train.BasicTraining
      extended by org.encog.neural.networks.training.propagation.Propagation
          extended by org.encog.neural.networks.training.propagation.quick.QuickPropagation
All Implemented Interfaces:
MLTrain, LearningRate, Train, MultiThreadable

public class QuickPropagation
extends Propagation
implements LearningRate

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.
 
Constructor Summary
QuickPropagation(ContainsFlat network, MLDataSet training)
          Construct a QPROP trainer for flat networks.
QuickPropagation(ContainsFlat network, MLDataSet training, double learnRate)
          Construct a QPROP trainer for flat networks.
 
Method Summary
 boolean canContinue()
          
 double[] getLastDelta()
           
 double getLearningRate()
           
 double getOutputEpsilon()
           
 double getShrink()
           
 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 setLearningRate(double rate)
          Set the learning rate, this is value is essentially a percent.
 void setOutputEpsilon(double outputEpsilon)
           
 void setShrink(double shrink)
           
 
Methods inherited from class org.encog.neural.networks.training.propagation.Propagation
finishTraining, fixFlatSpot, getCurrentFlatNetwork, getFlatTraining, getMethod, getThreadCount, iteration, iteration, setErrorFunction, setFlatTraining, 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

LAST_GRADIENTS

public static final String LAST_GRADIENTS
Continuation tag for the last gradients.

See Also:
Constant Field Values
Constructor Detail

QuickPropagation

public QuickPropagation(ContainsFlat network,
                        MLDataSet training)
Construct a QPROP trainer for flat networks. Uses a learning rate of 2.

Parameters:
network - The network to train.
training - The training data.

QuickPropagation

public QuickPropagation(ContainsFlat network,
                        MLDataSet training,
                        double learnRate)
Construct a QPROP trainer for flat networks.

Parameters:
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

canContinue

public final boolean canContinue()

Specified by:
canContinue in interface MLTrain
Returns:
True if the training can be paused, and later continued.

getLastDelta

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

getLearningRate

public final double getLearningRate()
Specified by:
getLearningRate in interface LearningRate
Returns:
The learning rate, this is value is essentially a percent. It is the degree to which the gradients are applied to the weight matrix to allow learning.

isValidResume

public final boolean isValidResume(TrainingContinuation state)
Determine if the specified continuation object is valid to resume with.

Parameters:
state - The continuation object to check.
Returns:
True if the specified continuation object is valid for this training method and network.

pause

public final TrainingContinuation pause()
Pause the training.

Specified by:
pause in interface MLTrain
Returns:
A training continuation object to continue with.

resume

public final void resume(TrainingContinuation state)
Resume training.

Specified by:
resume in interface MLTrain
Parameters:
state - The training state to return to.

setLearningRate

public final void setLearningRate(double rate)
Set the learning rate, this is value is essentially a percent. It is the degree to which the gradients are applied to the weight matrix to allow learning.

Specified by:
setLearningRate in interface LearningRate
Parameters:
rate - The learning rate.

getOutputEpsilon

public double getOutputEpsilon()
Returns:
the outputEpsilon

getShrink

public double getShrink()
Returns:
the shrink

setShrink

public void setShrink(double shrink)
Parameters:
shrink - the shrink to set

setOutputEpsilon

public void setOutputEpsilon(double outputEpsilon)
Parameters:
outputEpsilon - the outputEpsilon to set


Copyright © 2011. All Rights Reserved.