Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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, properties, propertyConnectionMgr, sourceBufferConnections, state, stateChgSupport, trace`

Constructor Summary
`AbleDecisionTree()`
`AbleDecisionTree(java.lang.String name)`

Method Summary
`protected void` | `copyInfo()`
`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, getInputBufferAsString, getInputBufferAsStringArray, getInputBufferContents, getLogger, getName, getOutputBuffer, getOutputBuffer, getOutputBufferAsString, getOutputBufferAsStringArray, getOutputBufferContents, getParent, getProperties, getProperty, getPropertyChangeListeners, 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, removeProperty, 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, setProperties, setProperty, 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

See Also:
  Constant Field Values

### TRAIN

    public static final short TRAIN

See Also:
  Constant Field Values

### TEST

    public static final short TEST

See Also:
  Constant Field Values

### RUN

    public static final short RUN

See Also:
  Constant Field Values

### 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.

  An application using asynchronous or timer event processing should sleep until the event queue is functional by imbedding logic like this:

          anAbleObject.init();
          while (!AbleState.isReady(anAbleObject.getState())) {
              try {
                  Thread.sleep(100l);
              } catch (InterruptedException e1) {
              }
          }

  Specified by:
    `init` in interface `AbleBean`
  Overrides:
    `init` in class `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.

  Specified by:
    `reset` in interface `AbleBean`
  Overrides:
    `reset` in class `AbleObject`
  Throws:
    `AbleException` - If an error occurs.
  See Also:
    `AbleBean.reset()`

### resetStatistics

    public void resetStatistics()
                         throws AbleException

  Throws:
    `AbleException`

### initFromImport

    protected void initFromImport()
                           throws AbleException

  Throws:
    `AbleException`

### copyInfo

    protected void copyInfo()
                     throws AbleException

  Throws:
    `AbleException`

### copyTrainData

    protected void copyTrainData()
                          throws AbleException

  Throws:
    `AbleException`

### copyTestData

    protected void copyTestData()
                         throws AbleException

  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.

  Specified by:
    `process` in interface `AbleBean`
  Overrides:
    `process` in class `AbleObject`
  Throws:
    `AbleException`
  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:

  - The queue's asynchronous thread of control is running.
  - Timer event processing is enabled.
  - The amount of time specified in `AbleObject.setSleepTime(long)` has expired.

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

  Specified by:
    `processTimerEvent` in interface `AbleEventQueueProcessor`
  Overrides:
    `processTimerEvent` in class `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).

  Specified by:
    `handleAbleEvent` in interface `AbleEventListener`
  Overrides:
    `handleAbleEvent` in class `AbleObject`

### 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.

  Throws:
    `AbleException`

### 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

  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.

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

(C) Copyright IBM Corporation 1999, 2005