org.encog.neural.networks.training.lma
public class LevenbergMarquardtTraining extends BasicTraining implements MultiThreadable
Modifier and Type | Field and Description |
---|---|
static double |
LAMBDA_MAX
The max amount for the LAMBDA.
|
static double |
SCALE_LAMBDA
The amount to scale the lambda by.
|
Constructor and Description |
---|
LevenbergMarquardtTraining(BasicNetwork network,
MLDataSet training)
Construct the LMA object.
|
LevenbergMarquardtTraining(BasicNetwork network,
MLDataSet training,
ComputeHessian h)
Construct the LMA object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canContinue() |
ComputeHessian |
getHessian() |
MLMethod |
getMethod()
Get the current best machine learning method from the training.
|
int |
getThreadCount() |
void |
iteration()
Perform one iteration.
|
TrainingContinuation |
pause()
Pause the training to continue later.
|
void |
resume(TrainingContinuation state)
Resume training.
|
void |
setThreadCount(int numThreads)
Set the number of threads to use.
|
void |
updateWeights()
Update the weights in the neural network.
|
addStrategy, finishTraining, getError, getImplementationType, getIteration, getStrategies, getTraining, isTrainingDone, iteration, postIteration, preIteration, setError, setIteration, setTraining
public static final double SCALE_LAMBDA
public static final double LAMBDA_MAX
public LevenbergMarquardtTraining(BasicNetwork network, MLDataSet training)
network
- The network to train. Must have a single output neuron.training
- The training data to use. Must be indexable.public LevenbergMarquardtTraining(BasicNetwork network, MLDataSet training, ComputeHessian h)
network
- The network to train. Must have a single output neuron.training
- The training data to use. Must be indexable.public boolean canContinue()
canContinue
in interface MLTrain
public MLMethod getMethod()
MLTrain
public void iteration()
public TrainingContinuation pause()
public void resume(TrainingContinuation state)
public void updateWeights()
public ComputeHessian getHessian()
public int getThreadCount()
getThreadCount
in interface MultiThreadable
public void setThreadCount(int numThreads)
MultiThreadable
setThreadCount
in interface MultiThreadable
numThreads
- The number of threads to use, or zero to
automatically determine based on core count.Copyright © 2014. All Rights Reserved.