org.joone.engine
Class ExtendedKalmanFilterFFN

java.lang.Object
  extended by org.joone.engine.ExtendedKalmanFilterFFN

public class ExtendedKalmanFilterFFN
extends java.lang.Object

Implements the extended Kalman filter (EKF) as described in "Using an extended Kalman filter learning algorithm for feed-forward neural networks to describe tracer correlations" by Lary and Mussa (2004) in order to train a feed-forward neural network. This requires some matrix algebra for which colt is utilised.

Author:
mg

Field Summary
protected  double kalmanBoost
          A boost factor used to dampen the Kalman gain
protected  java.util.List<NodesAndWeights.Node> nodes
          The list of nodes we use in the filter
protected  NodesAndWeights nodesAndWeights
          The network structure
protected  DoubleMatrix2D P
          The P matrix
protected  double p0
          The initial (diagonal) values to enter into the P matrix
protected  int patternCount
          The current pattern count
protected  int processorCount
          Number of processors to use, 2 or more indicates SMP
protected  DoubleMatrix2D Q
          The Q matrix
protected  double qDecay
          The Q decay factor
protected  DoubleMatrix2D R
          The R matrix
protected  double rDecay
          The R decay factor
protected  int verbose
          Zero for no verbosity, otherwise the number of patterns after which we croak
protected  DoubleMatrix1D W
          The weight estimate
protected  java.util.List<NodesAndWeights.Weight> weights
          The list of weights that we use in the filter
 
Constructor Summary
ExtendedKalmanFilterFFN(NodesAndWeights nodesAndWeights, double kalmanBoost, int verbose)
          Create a new instance of the filter
ExtendedKalmanFilterFFN(NodesAndWeights nodesAndWeights, double kalmanBoost, int verbose, int processorCount)
          Create a new instance of the filter - use for SMP
 
Method Summary
protected  void init()
          Initialise the filter
 void update(double[] error)
          Update the filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodesAndWeights

protected NodesAndWeights nodesAndWeights
The network structure


W

protected DoubleMatrix1D W
The weight estimate


P

protected DoubleMatrix2D P
The P matrix


p0

protected double p0
The initial (diagonal) values to enter into the P matrix


Q

protected DoubleMatrix2D Q
The Q matrix


qDecay

protected double qDecay
The Q decay factor


R

protected DoubleMatrix2D R
The R matrix


rDecay

protected double rDecay
The R decay factor


patternCount

protected int patternCount
The current pattern count


kalmanBoost

protected double kalmanBoost
A boost factor used to dampen the Kalman gain


nodes

protected java.util.List<NodesAndWeights.Node> nodes
The list of nodes we use in the filter


weights

protected java.util.List<NodesAndWeights.Weight> weights
The list of weights that we use in the filter


verbose

protected int verbose
Zero for no verbosity, otherwise the number of patterns after which we croak


processorCount

protected int processorCount
Number of processors to use, 2 or more indicates SMP

Constructor Detail

ExtendedKalmanFilterFFN

public ExtendedKalmanFilterFFN(NodesAndWeights nodesAndWeights,
                               double kalmanBoost,
                               int verbose)
Create a new instance of the filter

Parameters:
nodesAndWeights - the network to be optimised's structure
kalmanBoost - the boost factor (multiplier) to use
verbose - zero for no verbosity or the number of patterns after which we croak

ExtendedKalmanFilterFFN

public ExtendedKalmanFilterFFN(NodesAndWeights nodesAndWeights,
                               double kalmanBoost,
                               int verbose,
                               int processorCount)
Create a new instance of the filter - use for SMP

Parameters:
nodesAndWeights - the network to be optimised's structure
kalmanBoost - the boost factor (multiplier) to use
verbose - zero for no verbosity or the number of patterns after which we croak
processorCount - number of processors to use
Method Detail

init

protected void init()
Initialise the filter


update

public void update(double[] error)
Update the filter. Call this with the most recent error pattern as soon as one becomes available.

Parameters:
error - the most recently seen error pattern


Submit Feedback to pmarrone@users.sourceforge.net