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

com.ibm.able.beans.decisiontree
Class AbleDecisionTree

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

public class AbleDecisionTree
extends AbleObject
implements java.io.Serializable

class AbleDecisionTree

See Also:
Serialized Form

Field Summary
static java.lang.String Built
           
protected  int currentExample
           
protected  boolean decisionTreeBuilt
           
protected  int netMode
           
protected  double[] outBuffer
           
static short RUN
           
static short TEST
           
static short TRAIN
           
 
Fields inherited from class com.ibm.able.AbleObject
changed, chgSupport, comment, dataFlowEnabled, defaultName, destBufferConnections, eventQueue, fileName, inputBuffer, listeners, logger, name, outputBuffer, parent, propertyConnectionMgr, sourceBufferConnections, state, stateChgSupport, trace
 
Constructor Summary
AbleDecisionTree()
           
AbleDecisionTree(java.lang.String name)
           
 
Method Summary
protected  void copyInfo()
           
static java.lang.String Copyright()
          Determine the copyright of this class.
protected  void copyTestData()
           
protected  void copyTrainData()
           
 int getCorrectPredClass()
           
 int getCurrentExample()
           
 java.lang.String getDecisionTreeAsString()
          Return null if tree has not been built, and a formatted text representation if one has been built.
 boolean getDecisionTreeBuilt()
           
 int getDiscretizationInterval()
           
 int getIncorrectPredClass()
           
 int getNetMode()
          Get the value for some String property from the BeanWrapper
 double getPercentCorrect()
          Get the value for some String property from the BeanWrapper
 java.lang.String getPredictClass()
           
 int getPredictClassIndex()
           
 int getTotalPredClass()
           
 short[] getValsTestClass()
           
 short[] getValsTrainClass()
           
 void handleAbleEvent(AbleEvent theEvent)
          Handles an Able event.
 void init()
          Initialize and configure the bean.
protected  void initFromImport()
           
 boolean isDecisionTreeBuilt()
           
 void process()
          Performs the main, synchronous, standard processing function performed by this bean.
 void processTimerEvent()
          Process a timer expiration event synchronously; that is, on the same thread as the caller.
 void reset()
          Reset this bean to its "initialized" state.
 void resetStatistics()
           
 void setDecisionTreeBuilt(boolean theValue)
           
 void setDiscretizationInterval(int theCount)
           
 void setNetMode(int newValue)
          Set the value for some String property in BeanWrapper, and fire a propertyChange event to notify any propertyChange listeners.
 
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, hasInputBuffer, hasOutputBuffer, init, isAbleEventPostingEnabled, isAbleEventProcessingEnabled, isChanged, isConnectable, isDataFlowEnabled, isTimerEventProcessingEnabled, notifyAbleEventListeners, process, processAbleEvent, processBufferConnections, processNoEventProcessingEnabledSituation, 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

Built

public static final java.lang.String Built

TRAIN

public static final short TRAIN

TEST

public static final short TEST

RUN

public static final short RUN

netMode

protected int netMode

currentExample

protected int currentExample

decisionTreeBuilt

protected boolean decisionTreeBuilt

outBuffer

protected double[] outBuffer
Constructor Detail

AbleDecisionTree

public AbleDecisionTree()
                 throws AbleException

AbleDecisionTree

public AbleDecisionTree(java.lang.String name)
                 throws AbleException
Method Detail

init

public void init()
          throws AbleException
Description copied from class: AbleObject
Initialize and configure the bean. The bean's state changes to AbleState.Initiated or AbleState.Waiting. If either the AbleEventProcessing or TimerEventProcessing flags are enabled, this method calls AbleObject.startEnabledEventProcessing() to start a new thread for asynchronous or timer event processing.

An AbleProperty.ProcessingState PropertyChangeEvent is fired.

Beans overriding this method should call super.init() after any customization and before returning so that the thread is started if needed and the PropertyChangeEvent is fired.

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

reset

public void reset()
           throws AbleException
Description copied from class: AbleObject
Reset this bean to its "initialized" state.

This base method has no default implementation. It only provides tracing.

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

resetStatistics

public void resetStatistics()
                     throws AbleException

initFromImport

protected void initFromImport()
                       throws AbleException

copyInfo

protected void copyInfo()
                 throws AbleException

copyTrainData

protected void copyTrainData()
                      throws AbleException

copyTestData

protected void copyTestData()
                     throws AbleException

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()

processTimerEvent

public void processTimerEvent()
                       throws AbleException
Description copied from class: AbleObject
Process a timer expiration event synchronously; that is, on the same thread as the caller.

This method is called by the AbleEventQueue whenever the following conditions are all true:

This base method has no default implementation. It provides only tracing.

Overrides:
processTimerEvent in class AbleObject
Following copied from class: com.ibm.able.AbleObject
Throws:
AbleException - If an error occurs.

handleAbleEvent

public void handleAbleEvent(AbleEvent theEvent)
Description copied from interface: AbleEventListener
Handles an Able event. Most implementations will check to see if the event should be processed synchronously (on the same thread as the caller) or asynchronously (on a separate thread).
Overrides:
handleAbleEvent in class AbleObject
Following copied from interface: com.ibm.able.AbleEventListener
Parameters:
theAbleEvent - The event to handle.
Throws:
AbleException - If an error occurs.

setNetMode

public void setNetMode(int newValue)
                throws AbleException
Set the value for some String property in BeanWrapper, and fire a propertyChange event to notify any propertyChange listeners.

getNetMode

public int getNetMode()
Get the value for some String property from the BeanWrapper

getPercentCorrect

public double getPercentCorrect()
Get the value for some String property from the BeanWrapper

getTotalPredClass

public int getTotalPredClass()

getCorrectPredClass

public int getCorrectPredClass()

getIncorrectPredClass

public int getIncorrectPredClass()

getValsTrainClass

public short[] getValsTrainClass()

getValsTestClass

public short[] getValsTestClass()

getPredictClass

public java.lang.String getPredictClass()

getPredictClassIndex

public int getPredictClassIndex()

getCurrentExample

public int getCurrentExample()

setDiscretizationInterval

public void setDiscretizationInterval(int theCount)

getDiscretizationInterval

public int getDiscretizationInterval()

setDecisionTreeBuilt

public void setDecisionTreeBuilt(boolean theValue)
                          throws AbleException

isDecisionTreeBuilt

public boolean isDecisionTreeBuilt()

getDecisionTreeBuilt

public boolean getDecisionTreeBuilt()

getDecisionTreeAsString

public java.lang.String getDecisionTreeAsString()
Return null if tree has not been built, and a formatted text representation if one has been built.

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