org.encog.mathutil.matrices.hessian
Class BasicHessian
- java.lang.Object
-
- org.encog.mathutil.matrices.hessian.BasicHessian
-
- All Implemented Interfaces:
- ComputeHessian
public abstract class BasicHessian extends java.lang.Object implements ComputeHessian
Some basic code used to calculate Hessian matrixes.
-
-
Constructor Summary
Constructors Constructor and Description BasicHessian()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclear()Clear the Hessian and gradients.double[]getGradients()The gradeints.double[][]getHessian()MatrixgetHessianMatrix()doublegetSSE()voidinit(BasicNetwork theNetwork, MLDataSet theTraining)Init the class.voidupdateHessian(double[] d)Update the Hessian, sum's with what is in the Hessian already.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.encog.mathutil.matrices.hessian.ComputeHessian
compute
-
-
-
-
Method Detail
-
init
public void init(BasicNetwork theNetwork, MLDataSet theTraining)
Init the class.- Specified by:
initin interfaceComputeHessian- Parameters:
theNetwork- The neural network to train.theTraining- The training set to train with.
-
getGradients
public double[] getGradients()
The gradeints.- Specified by:
getGradientsin interfaceComputeHessian- Returns:
- The gradients for the Hessian.
-
getHessianMatrix
public Matrix getHessianMatrix()
- Specified by:
getHessianMatrixin interfaceComputeHessian- Returns:
- The Hessian matrix.
-
getHessian
public double[][] getHessian()
- Specified by:
getHessianin interfaceComputeHessian- Returns:
- Get the Hessian as a 2d array.
-
clear
public void clear()
Clear the Hessian and gradients.- Specified by:
clearin interfaceComputeHessian
-
getSSE
public double getSSE()
- Specified by:
getSSEin interfaceComputeHessian- Returns:
- The sum of squares error over all of the training elements.
-
updateHessian
public void updateHessian(double[] d)
Update the Hessian, sum's with what is in the Hessian already. Call clear to clear out old Hessian.- Parameters:
d- Vector to update with.
-
-
DMelt 3.0 © DataMelt by jWork.ORG