|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.classifiers.Classifier | +--weka.classifiers.DistributionClassifier | +--weka.classifiers.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. |
static void |
main(String[] args)
Main method. |
String |
toString()
Prints the decision tree using the private toString method from below. |
Methods inherited from class weka.classifiers.Classifier |
forName, makeCopies |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Id3()
Method Detail |
public void buildClassifier(Instances data) throws Exception
buildClassifier
in class Classifier
data
- the training data
Exception
- if classifier can't be built successfullypublic double classifyInstance(Instance instance)
classifyInstance
in class DistributionClassifier
instance
- the instance to be classified
public double[] distributionForInstance(Instance instance)
distributionForInstance
in class DistributionClassifier
instance
- the instance for which distribution is to be computed
public String toString()
toString
in class Object
public static void main(String[] args)
args
- the options for the classifier
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |