类 Id3
java.lang.Object
weka.classifiers.Classifier
weka.classifiers.trees.Id3
- 所有已实现的接口:
Serializable
,Cloneable
,Sourcable
,CapabilitiesHandler
,OptionHandler
,RevisionHandler
,TechnicalInformationHandler
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. BibTeX:
R. Quinlan (1986). Induction of decision trees. Machine Learning. 1(1):81-106. BibTeX:
@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
- 版本:
- $Revision: 6404 $
- 作者:
- Eibe Frank (eibe@cs.waikato.ac.nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明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.Returns default capabilities of the classifier.Returns the revision string.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.Returns a string describing the classifier.static void
Main method.Returns a string that describes the classifier as source.toString()
Prints the decision tree using the private toString method from below.从类继承的方法 weka.classifiers.Classifier
debugTipText, forName, getDebug, getOptions, listOptions, makeCopies, makeCopy, setDebug, setOptions
-
构造器详细资料
-
Id3
public Id3()
-
-
方法详细资料
-
globalInfo
Returns a string describing the classifier.- 返回:
- a description suitable for the GUI.
-
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.- 指定者:
getTechnicalInformation
在接口中TechnicalInformationHandler
- 返回:
- the technical information about this class
-
getCapabilities
Returns default capabilities of the classifier.- 指定者:
getCapabilities
在接口中CapabilitiesHandler
- 覆盖:
getCapabilities
在类中Classifier
- 返回:
- the capabilities of this classifier
- 另请参阅:
-
buildClassifier
Builds Id3 decision tree classifier.- 指定者:
buildClassifier
在类中Classifier
- 参数:
data
- the training data- 抛出:
Exception
- if classifier can't be built successfully
-
classifyInstance
Classifies a given test instance using the decision tree.- 覆盖:
classifyInstance
在类中Classifier
- 参数:
instance
- the instance to be classified- 返回:
- the classification
- 抛出:
NoSupportForMissingValuesException
- if instance has missing values
-
distributionForInstance
public double[] distributionForInstance(Instance instance) throws NoSupportForMissingValuesException Computes class distribution for instance using decision tree.- 覆盖:
distributionForInstance
在类中Classifier
- 参数:
instance
- the instance for which distribution is to be computed- 返回:
- the class distribution for the given instance
- 抛出:
NoSupportForMissingValuesException
- if instance has missing values
-
toString
Prints the decision tree using the private toString method from below. -
toSource
Returns a string that describes the classifier as source. The classifier will be contained in a class with the given name (there may be auxiliary classes), and will contain a method with the signature:
where the arraypublic static double classify(Object[] i);
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.
Note: works only if class attribute is the last attribute in the dataset. -
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中Classifier
- 返回:
- the revision
-
main
Main method.- 参数:
args
- the options for the classifier
-