org.encog.neural.networks.training.lma
Class JacobianChainRule
java.lang.Object
org.encog.neural.networks.training.lma.JacobianChainRule
- All Implemented Interfaces:
- ComputeJacobian
public class JacobianChainRule
- extends Object
- implements ComputeJacobian
Calculate the Jacobian using the chain rule.
----------------------------------------------------
This implementation of the Levenberg Marquardt algorithm is based heavily on code
published in an article by Cesar Roberto de Souza. The original article can be
found here:
http://crsouza.blogspot.com/2009/11/neural-network-learning-by-levenberg_18.html
Portions of this class are under the following copyright/license.
Copyright 2009 by Cesar Roberto de Souza, Released under the LGPL.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JacobianChainRule
public JacobianChainRule(BasicNetwork network,
MLDataSet indexableTraining)
- Construct the chain rule calculation.
- Parameters:
network - The network to use.indexableTraining - The training set to use.
calculate
public double calculate(double[] weights)
- Calculate the Jacobian matrix.
- Specified by:
calculate in interface ComputeJacobian
- Parameters:
weights - The weights for the neural network.
- Returns:
- The sum squared of the weights.
getError
public double getError()
- Returns:
- The sum squared errors.
getJacobian
public double[][] getJacobian()
- Specified by:
getJacobian in interface ComputeJacobian
- Returns:
- The Jacobian matrix.
getRowErrors
public double[] getRowErrors()
- Specified by:
getRowErrors in interface ComputeJacobian
- Returns:
- The errors for each row of the Jacobian.
Copyright © 2011. All Rights Reserved.