|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.classifiers.AbstractClassifier
weka.classifiers.trees.Id3
public class Id3
Class for constructing an unpruned decision tree based on the ID3 algorithm. Can only deal with nominal attributes. No missing values allowed. Empty leaves may result in unclassified instances. For more information see:
R. Quinlan (1986). Induction of decision trees. Machine Learning. 1(1):81-106.
@article{Quinlan1986,
author = {R. Quinlan},
journal = {Machine Learning},
number = {1},
pages = {81-106},
title = {Induction of decision trees},
volume = {1},
year = {1986}
}
Valid options are:
-D If set, classifier is run in debug mode and may output additional info to the console
| Constructor Summary | |
|---|---|
Id3()
|
|
| Method Summary | |
|---|---|
void |
buildClassifier(weka.core.Instances data)
Builds Id3 decision tree classifier. |
double |
classifyInstance(weka.core.Instance instance)
Classifies a given test instance using the decision tree. |
double[] |
distributionForInstance(weka.core.Instance instance)
Computes class distribution for instance using decision tree. |
weka.core.Capabilities |
getCapabilities()
Returns default capabilities of the classifier. |
String |
getRevision()
Returns the revision string. |
weka.core.TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on. |
String |
globalInfo()
Returns a string describing the classifier. |
static void |
main(String[] args)
Main method. |
String |
toSource(String className)
Returns a string that describes the classifier as source. |
String |
toString()
Prints the decision tree using the private toString method from below. |
| Methods inherited from class weka.classifiers.AbstractClassifier |
|---|
debugTipText, forName, getDebug, getOptions, listOptions, makeCopies, makeCopy, runClassifier, setDebug, setOptions |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Id3()
| Method Detail |
|---|
public String globalInfo()
public weka.core.TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface weka.core.TechnicalInformationHandlerpublic weka.core.Capabilities getCapabilities()
getCapabilities in interface weka.classifiers.ClassifiergetCapabilities in interface weka.core.CapabilitiesHandlergetCapabilities in class weka.classifiers.AbstractClassifier
public void buildClassifier(weka.core.Instances data)
throws Exception
buildClassifier in interface weka.classifiers.Classifierdata - the training data
Exception - if classifier can't be built successfully
public double classifyInstance(weka.core.Instance instance)
throws weka.core.NoSupportForMissingValuesException
classifyInstance in interface weka.classifiers.ClassifierclassifyInstance in class weka.classifiers.AbstractClassifierinstance - the instance to be classified
weka.core.NoSupportForMissingValuesException - if instance has missing values
public double[] distributionForInstance(weka.core.Instance instance)
throws weka.core.NoSupportForMissingValuesException
distributionForInstance in interface weka.classifiers.ClassifierdistributionForInstance in class weka.classifiers.AbstractClassifierinstance - the instance for which distribution is to be computed
weka.core.NoSupportForMissingValuesException - if instance has missing valuespublic String toString()
toString in class Object
public String toSource(String className)
throws Exception
public static double classify(Object[] i);
where the array i contains elements that are either
Double, String, with missing values represented as null. The generated
code is public domain and comes with no warranty.
toSource in interface weka.classifiers.SourcableclassName - the name that should be given to the source class.
Exception - if the source can't be computedpublic String getRevision()
getRevision in interface weka.core.RevisionHandlergetRevision in class weka.classifiers.AbstractClassifierpublic 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 | |||||||||