ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.able.beans
Class AbleTimeSeriesFilter

java.lang.Object
  |
  +--com.ibm.able.AbleObject
        |
        +--com.ibm.able.beans.AbleTimeSeriesFilter
All Implemented Interfaces:
AbleBean, AbleDataBufferManager, AbleEventListener, AbleEventListenerManager, AbleEventQueueManager, AbleEventQueueProcessor, AblePropertyChangeManager, AbleSerializable, java.io.Serializable

public class AbleTimeSeriesFilter
extends AbleObject

The AbleTimeSeriesFilter is intended for use in the AbleNeuralPredictionAgent. It collects a set of inputBuffers so that a model can use more than one period's data in its calculations. Only all numeric data is supported.

The number of periods used in the calculation is termed the windowSize. If each record has n input fields and m periods are specified, the bean's output will be of size n x m plus the number of output values forecast. Default value is 1.

The number of periods in the future to predict is the horizon. The default value is zero, which means the target output value will be read from the last record in the window. A horizon value of 1 means to predict the next period.

A window and horizon setting of 1 and 0 means the filter does not manipulate the input stream.

See Also:
Serialized Form

Field Summary
static java.lang.String defaultName
          Value assigned to name by default.
protected  int horizon
           
protected  double[] inNum
           
protected  boolean loaded
           
protected  int numInUnits
           
protected  int numOutUnits
           
protected  double[] outNum
           
protected  int recInx
           
protected static long serialVersionUID
          Serialized version identifier in form YYYYMMDDVerRelModxx
protected  double[] tmpNum
           
protected  int totalOutUnits
           
protected  int totalTmpUnits
           
protected  int windowSize
           
 
Fields inherited from class com.ibm.able.AbleObject
changed, chgSupport, comment, dataFlowEnabled, destBufferConnections, eventQueue, fileName, inputBuffer, listeners, logger, name, outputBuffer, parent, propertyConnectionMgr, sourceBufferConnections, state, stateChgSupport, trace
 
Constructor Summary
AbleTimeSeriesFilter()
          Construct a default AbleTimeSeriesFilter.
AbleTimeSeriesFilter(java.lang.String name)
          Construct an AbleTimeSeriesFilter object with specified name.
 
Method Summary
static java.lang.String Copyright()
          Determine the copyright of this class.
 int getHorizon()
          Get the horizon, the number of periods in the future to predict.
 int getNumInUnits()
          Get the number of input units.
 int getNumOutUnits()
          Get the number of output units.
 int getWindowSize()
          Get the windowSize, the number of periods to be used in the forecast.
 void init()
          Allocate the arrays used to store data based on the windowSize, horizon, numInUnits, and numOutUnits per record.
 boolean isLoaded()
          Returns true if the filter has been loaded with data and is ready for processing (output buffer is valid)
 void process()
          Performs the main, synchronous, standard processing function performed by this bean.
 void reset()
          Reset the time series filter.
 void setHorizon(int horizon)
          Set the horizon, the number of periods in the future to predict.
 void setNumInUnits(int numInUnits)
          Set the number of input units.
 void setNumOutUnits(int numOutUnits)
          Set the number of output units.
 void setWindowSize(int windowSize)
          Set the windowSize, the number of periods to be used in the forecast.
 
Methods inherited from class com.ibm.able.AbleObject
addAbleEventListener, addDestBufferConnection, addPropertyChangeListener, addPropertyConnection, addSourceBufferConnection, addStateChangeListener, dataChanged, firePropertyChange, flushAbleEventQueue, getAbleEventListeners, getAbleEventProcessingEnabled, getAbleEventQueueSize, getComment, getDestBufferConnections, getFileName, getInputBuffer, getInputBuffer, getInputBufferAsStringArray, getInputBufferContents, getLogger, getName, getOutputBuffer, getOutputBuffer, getOutputBufferAsStringArray, getOutputBufferContents, getParent, getPropertyConnectionManager, getSleepTime, getSourceBufferConnections, getState, getTraceLogger, handleAbleEvent, hasInputBuffer, hasOutputBuffer, init, isAbleEventPostingEnabled, isAbleEventProcessingEnabled, isChanged, isConnectable, isDataFlowEnabled, isTimerEventProcessingEnabled, notifyAbleEventListeners, process, processAbleEvent, processBufferConnections, processNoEventProcessingEnabledSituation, processTimerEvent, quitAll, quitEnabledEventProcessing, removeAbleEventListener, removeAllAbleEventListeners, removeAllBufferConnections, removeAllConnections, removeAllPropertyConnections, removeDestBufferConnection, removePropertyChangeListener, removePropertyConnection, removeSourceBufferConnection, removeStateChangeListener, restartEnabledEventProcessing, restoreFromFile, restoreFromFile, restoreFromSerializedFile, restoreFromStream, resumeAll, resumeEnabledEventProcessing, saveToFile, saveToFile, setAbleEventProcessingEnabled, setChanged, setComment, setDataFlowEnabled, setFileName, setInputBuffer, setInputBuffer, setLogger, setName, setOutputBuffer, setOutputBuffer, setParent, setSleepTime, setState, setTimerEventProcessingEnabled, setTraceLogger, sourceConnectionsOK, startEnabledEventProcessing, suspendAll, suspendEnabledEventProcessing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultName

public static final java.lang.String defaultName
Value assigned to name by default.

serialVersionUID

protected static final long serialVersionUID
Serialized version identifier in form YYYYMMDDVerRelModxx

inNum

protected double[] inNum

outNum

protected double[] outNum

tmpNum

protected double[] tmpNum

windowSize

protected int windowSize

horizon

protected int horizon

numInUnits

protected int numInUnits

numOutUnits

protected int numOutUnits

totalTmpUnits

protected int totalTmpUnits

totalOutUnits

protected int totalOutUnits

recInx

protected int recInx

loaded

protected boolean loaded
Constructor Detail

AbleTimeSeriesFilter

public AbleTimeSeriesFilter()
                     throws AbleException
Construct a default AbleTimeSeriesFilter.

AbleTimeSeriesFilter

public AbleTimeSeriesFilter(java.lang.String name)
                     throws AbleException
Construct an AbleTimeSeriesFilter object with specified name.
Parameters:
name - A String containing the name used to identify this bean.
Method Detail

setWindowSize

public void setWindowSize(int windowSize)
Set the windowSize, the number of periods to be used in the forecast. Values less than one are ignored as invalid.

getWindowSize

public int getWindowSize()
Get the windowSize, the number of periods to be used in the forecast.

setHorizon

public void setHorizon(int horizon)
Set the horizon, the number of periods in the future to predict. Values less than zero are ignored as invalid.

getHorizon

public int getHorizon()
Get the horizon, the number of periods in the future to predict.

setNumInUnits

public void setNumInUnits(int numInUnits)
Set the number of input units.

getNumInUnits

public int getNumInUnits()
Get the number of input units.

setNumOutUnits

public void setNumOutUnits(int numOutUnits)
Set the number of output units.

getNumOutUnits

public int getNumOutUnits()
Get the number of output units.

isLoaded

public boolean isLoaded()
Returns true if the filter has been loaded with data and is ready for processing (output buffer is valid)

init

public void init()
          throws AbleException
Allocate the arrays used to store data based on the windowSize, horizon, numInUnits, and numOutUnits per record.

Note: default windowSize=1, horizon=0 means record is just passed through without any internal buffering

Overrides:
init in class AbleObject
Following copied from class: com.ibm.able.AbleObject
Throws:
AbleException - If an error occurs.
See Also:
AbleObject.startEnabledEventProcessing()

process

public void process()
             throws AbleException
Description copied from class: AbleObject
Performs the main, synchronous, standard processing function performed by this bean.

This base method implementation provides tracing only.

Overrides:
process in class AbleObject
Following copied from class: com.ibm.able.AbleObject
See Also:
AbleObject.inputBuffer, AbleObject.outputBuffer, AbleBean.process()

reset

public void reset()
           throws AbleException
Reset the time series filter. Set processing options to default values. No timer processing or event posting or processing.
Overrides:
reset in class AbleObject
Following copied from class: com.ibm.able.AbleObject
Throws:
AbleException - If an error occurs.
See Also:
AbleBean.reset()

Copyright

public static java.lang.String Copyright()
Determine the copyright of this class.
Returns:
A String containing this class's copyright statement.


ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003