|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.able.AbleObject | +--com.ibm.able.beans.knn.AbleDecisionTree
Field Summary | |
---|---|
static java.lang.String |
defaultName
Value assigned to name by default. |
double[] |
inNum
The numeric input buffer |
static java.lang.String[] |
MODE_NAMES
Labels for the train, test and run modes for GUI use. |
double[] |
outNum
The numeric output buffer |
static java.lang.String |
PropertyDiscr
|
static int |
PropertyDiscrId
|
static java.lang.String |
PropertyMetric
|
static int |
PropertyMetricId
|
static int |
RUN
Application or Run mode output is produced |
static int |
TEST
Test mode performance is tested (errors are computed) |
static int |
TRAIN
Training mode training data is stored |
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 | |
---|---|
AbleDecisionTree()
Default constructor |
|
AbleDecisionTree(java.lang.String aName)
Construct a decision tree bean with specified name |
|
AbleDecisionTree(java.lang.String aName,
int args1,
int args2)
|
Method Summary | |
---|---|
static java.lang.String |
Copyright()
Determine the copyright of this class. |
void |
generateTranslateTemplates(AbleFilter inFilt,
AbleFilter outFilt,
java.util.Vector fields)
The next three methods change the default behaviour of the ABLE filters, making them appropriate for decision tree algorithm. |
double |
getAccuracy()
Get the accuracy |
double |
getCurrentActualClass()
Get the current actual classes corresponding to the current test example |
double |
getCurrentLearnedClass()
Get the current learned classes corresponding to the current test/run example |
double[] |
getCurrentTestExample()
Get the current test example |
double[] |
getCurrentTrainExample()
Get the current training example |
double |
getCurrentTrainRecord()
Get the index of current training example |
int |
getDecisionTreeMode()
Get the current operating mode of the decision tree bean. |
int |
getDiscretization()
Get discretization parameter |
double |
getError()
Get the error |
double[] |
getInNum()
|
int |
getMetric()
Get metric parameter |
int |
getNumAttributes()
Get numAttr parameter |
int |
getNumClasses()
Get numClasses parameter |
long |
getNumCorrectTestExamples()
Get the number of correctly classified test examples |
long |
getNumRecords()
Get numRecords parameter |
long |
getNumTestExamples()
Get the number of test examples seen so far |
double[] |
getOutNum()
|
void |
init()
Get ready to process - init all the bean members |
void |
process()
Performs the main, synchronous, standard processing function performed by this bean. |
void |
reset()
reset the decision tree bean |
void |
resetTable()
|
void |
setDecisionTreeMode(int mode)
Set the operating mode of the decision tree bean. |
void |
setDecisionTreeParameters(int newAttr,
int newCl,
long newRec)
Set the number records, number attributes and number classes for decision tree bean |
protected void |
setDefaults()
Set up the event queue behavior No timer processing and no asynch event processing |
void |
setDiscretization(int newDiscr)
Set the discretization parameter |
void |
setMetric(int newMetric)
Set the metric parameter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String defaultName
public static final int PropertyMetricId
public static final java.lang.String PropertyMetric
public static final int PropertyDiscrId
public static final java.lang.String PropertyDiscr
public double[] inNum
public double[] outNum
public static final int TRAIN
public static final int TEST
public static final int RUN
public static final java.lang.String[] MODE_NAMES
Constructor Detail |
public AbleDecisionTree() throws AbleException
public AbleDecisionTree(java.lang.String aName) throws AbleException
Name
- The object name
public AbleDecisionTree(java.lang.String aName, int args1, int args2) throws AbleException
Method Detail |
public double[] getInNum()
public double[] getOutNum()
protected void setDefaults() throws AbleException
public int getDecisionTreeMode()
public void setDecisionTreeMode(int mode)
Mode
- The current operating mode, train/test/run
public void setDecisionTreeParameters(int newAttr, int newCl, long newRec)
parameter
- newRec that defines the number of recordsparameter
- newAttr that defines the number of attributesparameter
- newCl that defines the number of classespublic void setMetric(int newMetric) throws AbleException
public int getMetric()
public void setDiscretization(int newDiscr) throws AbleException
public int getDiscretization()
public long getNumRecords()
public int getNumAttributes()
public int getNumClasses()
public long getNumTestExamples()
public long getNumCorrectTestExamples()
public double getAccuracy()
public double getError()
public double[] getCurrentTrainExample()
public double[] getCurrentTestExample()
public double getCurrentLearnedClass()
public double getCurrentActualClass()
public double getCurrentTrainRecord()
public void init() throws AbleException
init
in class AbleObject
com.ibm.able.AbleObject
AbleException
- If an error occurs.AbleObject.startEnabledEventProcessing()
public void reset() throws AbleException
reset
in class AbleObject
com.ibm.able.AbleObject
AbleException
- If an error occurs.AbleBean.reset()
public void resetTable() throws AbleException
public void process() throws AbleException
AbleObject
This base method implementation provides tracing only.
process
in class AbleObject
com.ibm.able.AbleObject
AbleObject.inputBuffer
,
AbleObject.outputBuffer
,
AbleBean.process()
public void generateTranslateTemplates(AbleFilter inFilt, AbleFilter outFilt, java.util.Vector fields) throws AbleException
generateTranslateTemplates
in interface AbleTranslateTemplateProvider
com.ibm.able.beans.filter.AbleTranslateTemplateProvider
inFilter
- The AbleFilter used to convert incoming data.outFilter
- The AbleFilter used to convert outgoing data.fields
- A vector of AbleFields from which to derive the translation template.public static java.lang.String Copyright()
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |