org.joone.engine
Class ExtendedKalmanFilterRNN

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

public class ExtendedKalmanFilterRNN
extends java.lang.Object

Implements the extended Kalman filter (EKF) as described in "Some observations on the use of the extended Kalman filter as a recurrent network learning algorithm" by Williams (1992) in order to train a recurrent neural network. This requires some matrix algebra for which colt is utilised.

Author:
mg

Field Summary
protected  double initVarW
          The initial weight variance estimate
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 P1p
          The P1+ matrix
protected  DoubleMatrix2D P2p
          The P2+ matrix
protected  DoubleMatrix2D P4p
          The P4+ matrix
protected  int patternCount
          Pattern count
protected  int processorCount
          Number of processors to use - if 2 or more, will use SMP
protected  double varDecay
          Variance decay factor
protected  double[] varU
          Used to update the unit variance estimates
protected  double[] varW
          Used to update the weight variance estimates
protected  int verbose
          Zero for no verbosity, otherwise the number of patterns after which we croak
protected  java.util.List<NodesAndWeights.Weight> weights
          The list of weights that we use in the filter
protected  DoubleMatrix1D Wp
          The W+ vector
protected  DoubleMatrix1D yp
          The y+ vector
 
Constructor Summary
ExtendedKalmanFilterRNN(NodesAndWeights nodesAndWeights, double kalmanBoost, int verbose)
          Create a new instance of the filter
ExtendedKalmanFilterRNN(NodesAndWeights nodesAndWeights, double kalmanBoost, int verbose, int processorCount)
          Create a new instance of the filter
 
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


yp

protected DoubleMatrix1D yp
The y+ vector


Wp

protected DoubleMatrix1D Wp
The W+ vector


P1p

protected DoubleMatrix2D P1p
The P1+ matrix


P4p

protected DoubleMatrix2D P4p
The P4+ matrix


P2p

protected DoubleMatrix2D P2p
The P2+ matrix


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


varW

protected double[] varW
Used to update the weight variance estimates


initVarW

protected double initVarW
The initial weight variance estimate


varU

protected double[] varU
Used to update the unit variance estimates


varDecay

protected double varDecay
Variance decay factor


patternCount

protected int patternCount
Pattern count


kalmanBoost

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


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 - if 2 or more, will use SMP

Constructor Detail

ExtendedKalmanFilterRNN

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

Parameters:
nodesAndWeights - the network we need to optimise
kalmanBoost - the boost factor (multiplier) to use
verbose - zero for no verbosity or the number of patterns after which we croak
processorCount - if more than 2, will use SMP

ExtendedKalmanFilterRNN

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

Parameters:
nodesAndWeights - the network we need to optimise
kalmanBoost - the boost factor (multiplier) to use
verbose - zero for no verbosity or the number of patterns after which we croak
Method Detail

init

protected void init()
Initialise the filter


update

public void update(double[] error)
Update the filter

Parameters:
error - the most recently seen error pattern


Submit Feedback to pmarrone@users.sourceforge.net