All Packages Class Hierarchy This Package Previous Next Index WEKA's home
Class weka.classifiers.Id3
java.lang.Object
|
+----weka.classifiers.Classifier
|
+----weka.classifiers.DistributionClassifier
|
+----weka.classifiers.Id3
- public class Id3
- extends DistributionClassifier
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.
- Version:
- $Revision: 1.5 $
- Author:
- Eibe Frank (eibe@cs.waikato.ac.nz)
-
Id3()
-
-
buildClassifier(Instances)
- Builds Id3 decision tree classifier.
-
classifyInstance(Instance)
- Classifies a given test instance using the decision tree.
-
distributionForInstance(Instance)
- Computes class distribution for instance using decision tree.
-
main(String[])
- Main method.
-
toString()
- Prints the decision tree using the private toString method from below.
Id3
public Id3()
buildClassifier
public void buildClassifier(Instances data) throws Exception
- Builds Id3 decision tree classifier.
- Parameters:
- data - the training data
- Throws: Exception
- if classifier can't be built successfully
- Overrides:
- buildClassifier in class Classifier
classifyInstance
public double classifyInstance(Instance instance)
- Classifies a given test instance using the decision tree.
- Parameters:
- instance - the instance to be classified
- Returns:
- the classification
- Overrides:
- classifyInstance in class DistributionClassifier
distributionForInstance
public double[] distributionForInstance(Instance instance)
- Computes class distribution for instance using decision tree.
- Parameters:
- instance - the instance for which distribution is to be computed
- Returns:
- the class distribution for the given instance
- Overrides:
- distributionForInstance in class DistributionClassifier
toString
public String toString()
- Prints the decision tree using the private toString method from below.
- Returns:
- a textual description of the classifier
- Overrides:
- toString in class Object
main
public static void main(String args[])
- Main method.
- Parameters:
- args - the options for the classifier
All Packages Class Hierarchy This Package Previous Next Index WEKA's home