org.encog.mathutil.matrices.hessian
Class ChainRuleWorker
java.lang.Object
org.encog.mathutil.matrices.hessian.ChainRuleWorker
- All Implemented Interfaces:
- EngineTask
public class ChainRuleWorker
- extends Object
- implements EngineTask
A threaded worker that is used to calculate the first derivatives of the
output of the neural network. These values are ultimatly used to calculate
the Hessian.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChainRuleWorker
public ChainRuleWorker(FlatNetwork theNetwork,
MLDataSet theTraining,
int theLow,
int theHigh)
- Construct the chain rule worker.
- Parameters:
theNetwork
- The network to calculate a Hessian for.theTraining
- The training data.theLow
- The low range.theHigh
- The high range.
run
public void run()
- The task to perform.
- Specified by:
run
in interface EngineTask
getOutputNeuron
public int getOutputNeuron()
- Returns:
- the outputNeuron
setOutputNeuron
public void setOutputNeuron(int outputNeuron)
- Parameters:
outputNeuron
- the outputNeuron to set
getDerivative
public double[] getDerivative()
- Returns:
- The first derivatives, used to calculate the Hessian.
getGradients
public double[] getGradients()
- Returns:
- the gradients
getError
public double getError()
- Returns:
- The SSE error.
getNetwork
public FlatNetwork getNetwork()
- Returns:
- The flat network.
getHessian
public double[][] getHessian()
- Returns:
- the hessian
Copyright © 2014. All Rights Reserved.