org.encog.mathutil.matrices.hessian
Class HessianCR

java.lang.Object
  extended by org.encog.mathutil.matrices.hessian.BasicHessian
      extended by org.encog.mathutil.matrices.hessian.HessianCR
All Implemented Interfaces:
ComputeHessian, MultiThreadable

public class HessianCR
extends BasicHessian
implements MultiThreadable

Calculate the Hessian matrix using the chain rule method.


Field Summary
 
Fields inherited from class org.encog.mathutil.matrices.hessian.BasicHessian
flat, gradients, hessian, hessianMatrix, network, sse, training
 
Constructor Summary
HessianCR()
           
 
Method Summary
 void compute()
          Compute the Hessian.
 int getThreadCount()
           
 void init(BasicNetwork theNetwork, MLDataSet theTraining)
          Init the class.
 void setThreadCount(int numThreads)
          Set the number of threads.
 
Methods inherited from class org.encog.mathutil.matrices.hessian.BasicHessian
clear, getGradients, getHessian, getHessianMatrix, getSSE, updateHessian
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HessianCR

public HessianCR()
Method Detail

init

public void init(BasicNetwork theNetwork,
                 MLDataSet theTraining)
Init the class.

Specified by:
init in interface ComputeHessian
Overrides:
init in class BasicHessian
Parameters:
theNetwork - The neural network to train.
theTraining - The training set to train with.

compute

public void compute()
Compute the Hessian.

Specified by:
compute in interface ComputeHessian

setThreadCount

public final void setThreadCount(int numThreads)
Set the number of threads. Specify zero to tell Encog to automatically determine the best number of threads for the processor. If OpenCL is used as the target device, then this value is not used.

Specified by:
setThreadCount in interface MultiThreadable
Parameters:
numThreads - The number of threads.

getThreadCount

public int getThreadCount()
Specified by:
getThreadCount in interface MultiThreadable
Returns:
The thread count.


Copyright © 2014. All Rights Reserved.