lnsc.lstm
Class OnlineSPMSELearning

java.lang.Object
  |
  +--lnsc.lstm.OnlineSPMSELearning
All Implemented Interfaces:
OnlineUnsupervisedLearning, java.io.Serializable

public class OnlineSPMSELearning
extends java.lang.Object
implements OnlineUnsupervisedLearning, java.io.Serializable

Generic Predictive Minimized Sum-squared-error online learning procedure. It should be upgraded to use a generic Optimizer and to be exported into some other package. At the limit, it could be generalized by having a FunctionalUnit to optimize. (It minimizes half-MSE.) This one can predict a single of its input. Note that in the data set, input/output and network data are current pattern data. Target, error, gradients, param, and everything related to learning are previous pattern data. Since the goal of the net is to predict the next input, the correction can only be done on the next call to train, prior to procesing the new input pattern. Note, if the function is not stateless, it should not process data between train calls, unless a reset is called. The network must have a single output.

See Also:
Serialized Form

Constructor Summary
OnlineSPMSELearning(FunctionalUnit2 newFunc, double newAlpha, int newIndex)
          Constructs a learner for an LSTM network.
 
Method Summary
 void reset()
          Indicates the end of a sequence, restart function internal state.
 void setLearningRate(double newLearningRate)
          Allow the learning rate to be changed.
 java.lang.String toString()
           
 void train(double[] inputPattern)
          Train whatever associate functions it as for a single patterns.
 DataSet train(double[] inputPattern, java.lang.String[] recordList)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OnlineSPMSELearning

public OnlineSPMSELearning(FunctionalUnit2 newFunc,
                           double newAlpha,
                           int newIndex)
Constructs a learner for an LSTM network.

Parameters:
newAlpha - Learning rat
newIndex -
Method Detail

reset

public void reset()
Indicates the end of a sequence, restart function internal state.


setLearningRate

public void setLearningRate(double newLearningRate)
Allow the learning rate to be changed.

Parameters:
newLearningRate - New learning rate value.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

train

public void train(double[] inputPattern)
Description copied from interface: OnlineUnsupervisedLearning
Train whatever associate functions it as for a single patterns.

Specified by:
train in interface OnlineUnsupervisedLearning

train

public DataSet train(double[] inputPattern,
                     java.lang.String[] recordList)