|
||||||||||
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.nm.NelderMeadTraining
public class NelderMeadTraining
The Nelder-Mead method is a commonly used parameter optimization method that can be used for neural network training. It typically provides a good error rate and is relatively fast. Nelder-Mead must build a simplex, which is an n*(n+1) matrix of weights. If you have a large number of weights, this matrix can quickly overflow memory. The biggest enhancement that is needed for this trainer is to make use of multi-threaded code to evaluate the speed evaluations when training on a multi-core. This implementation is based on the source code provided by John Burkardt (http://people.sc.fsu.edu/~jburkardt/) http://people.sc.fsu.edu/~jburkardt/c_src/asa047/asa047.c
Constructor Summary | |
---|---|
NelderMeadTraining(BasicNetwork network,
MLDataSet training)
Construct a Nelder Mead trainer with a step size of 100. |
|
NelderMeadTraining(BasicNetwork network,
MLDataSet training,
double stepValue)
Construct a Nelder Mead trainer with a definable step. |
Method Summary | |
---|---|
boolean |
canContinue()
|
double |
fn(double[] weights)
Calculate the error for the neural network with a given set of weights. |
MLMethod |
getMethod()
Get the current best machine learning method from the training. |
boolean |
isTrainingDone()
|
void |
iteration()
Perform one iteration of training. |
TrainingContinuation |
pause()
Pause the training to continue later. |
void |
resume(TrainingContinuation state)
Resume training. |
Methods inherited from class org.encog.ml.train.BasicTraining |
---|
addStrategy, finishTraining, getError, getImplementationType, getIteration, getStrategies, getTraining, iteration, postIteration, preIteration, setError, setIteration, setTraining |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NelderMeadTraining(BasicNetwork network, MLDataSet training)
network
- The network to train.training
- The training set to use.public NelderMeadTraining(BasicNetwork network, MLDataSet training, double stepValue)
network
- The network to train.training
- The training data to use.stepValue
- The step value. This value defines, to some degree the range
of different weights that will be tried.Method Detail |
---|
public boolean canContinue()
public double fn(double[] weights)
weights
- The weights to use.
public MLMethod getMethod()
public boolean isTrainingDone()
isTrainingDone
in interface MLTrain
isTrainingDone
in class BasicTraining
public void iteration()
public TrainingContinuation pause()
public void resume(TrainingContinuation state)
state
- The training continuation object to use to continue.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |