|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.classifiers.Classifier | +--weka.classifiers.trees.Id3
Class implementing an Id3 decision tree classifier. For more information, see
R. Quinlan (1986). Induction of decision trees. Machine Learning. Vol.1, No.1, pp. 81-106.
Constructor Summary | |
Id3()
|
Method Summary | |
void |
buildClassifier(Instances data)
Builds Id3 decision tree classifier. |
double |
classifyInstance(Instance instance)
Classifies a given test instance using the decision tree. |
double[] |
distributionForInstance(Instance instance)
Computes class distribution for instance using decision tree. |
java.lang.String |
globalInfo()
Returns a string describing classifier |
static void |
main(java.lang.String[] args)
Main method. |
java.lang.String |
toString()
Prints the decision tree using the private toString method from below. |
Methods inherited from class weka.classifiers.Classifier |
debugTipText, forName, getDebug, getOptions, listOptions, makeCopies, setDebug, setOptions |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Id3()
Method Detail |
public java.lang.String globalInfo()
public void buildClassifier(Instances data) throws java.lang.Exception
buildClassifier
in class Classifier
data
- the training data
java.lang.Exception
- if classifier can't be built successfullypublic double classifyInstance(Instance instance)
classifyInstance
in class Classifier
instance
- the instance to be classified
public double[] distributionForInstance(Instance instance)
distributionForInstance
in class Classifier
instance
- the instance for which distribution is to be computed
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
args
- the options for the classifier
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London