|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.neural.networks.training.BasicTraining
org.encog.neural.networks.training.lma.LevenbergMarquardtTraining
public class LevenbergMarquardtTraining
Trains a neural network using a Levenberg Marquardt algorithm (LMA). This training technique is based on the mathematical technique of the same name. http://en.wikipedia.org/wiki/Levenberg%E2%80%93Marquardt_algorithm The LMA training technique has some important limitations that you should be aware of, before using it. Only neural networks that have a single output neuron can be used with this training technique. The entire training set must be loaded into memory. Because of this an Indexable training set must be used. However, despite these limitations, the LMA training technique can be a very effective training method. References: - http://www-alg.ist.hokudai.ac.jp/~jan/alpha.pdf - http://www.inference.phy.cam.ac.uk/mackay/Bayes_FAQ.html
| Field Summary | |
|---|---|
static double |
LAMBDA_MAX
The max amount for the LAMBDA. |
static double |
SCALE_LAMBDA
The amount to scale the lambda by. |
| Constructor Summary | |
|---|---|
LevenbergMarquardtTraining(BasicNetwork network,
NeuralDataSet training)
Construct the LMA object. |
|
| Method Summary | |
|---|---|
void |
calculateHessian(double[][] jacobian,
double[] errors)
Calculate the Hessian matrix. |
BasicNetwork |
getNetwork()
Get the current best network from the training. |
boolean |
isUseBayesianRegularization()
|
void |
iteration()
Perform one iteration. |
void |
setUseBayesianRegularization(boolean useBayesianRegularization)
Set if Bayesian regularization should be used. |
static double |
trace(double[][] m)
Return the sum of the diagonal. |
double |
updateWeights()
Update the weights. |
| Methods inherited from class org.encog.neural.networks.training.BasicTraining |
|---|
addStrategy, finishTraining, getCloud, getError, getIteration, getStrategies, getTraining, isTrainingDone, iteration, postIteration, preIteration, setCloud, setError, setIteration, setTraining |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double SCALE_LAMBDA
public static final double LAMBDA_MAX
| Constructor Detail |
|---|
public LevenbergMarquardtTraining(BasicNetwork network,
NeuralDataSet training)
network - The network to train. Must have a single output neuron.training - The training data to use. Must be indexable.| Method Detail |
|---|
public static double trace(double[][] m)
m - The matrix to sum.
public void calculateHessian(double[][] jacobian,
double[] errors)
jacobian - The Jacobian matrix.errors - The errors.public BasicNetwork getNetwork()
Train
public boolean isUseBayesianRegularization()
public void iteration()
public void setUseBayesianRegularization(boolean useBayesianRegularization)
useBayesianRegularization - True to use Bayesian regularization.public double updateWeights()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||