类 NBTree
java.lang.Object
weka.classifiers.Classifier
weka.classifiers.trees.NBTree
- 所有已实现的接口:
Serializable
,Cloneable
,AdditionalMeasureProducer
,CapabilitiesHandler
,Drawable
,OptionHandler
,RevisionHandler
,Summarizable
,TechnicalInformationHandler
,WeightedInstancesHandler
public class NBTree
extends Classifier
implements WeightedInstancesHandler, Drawable, Summarizable, AdditionalMeasureProducer, TechnicalInformationHandler
Class for generating a decision tree with naive Bayes classifiers at the leaves.
For more information, see
Ron Kohavi: Scaling Up the Accuracy of Naive-Bayes Classifiers: A Decision-Tree Hybrid. In: Second International Conference on Knoledge Discovery and Data Mining, 202-207, 1996. BibTeX:
For more information, see
Ron Kohavi: Scaling Up the Accuracy of Naive-Bayes Classifiers: A Decision-Tree Hybrid. In: Second International Conference on Knoledge Discovery and Data Mining, 202-207, 1996. BibTeX:
@inproceedings{Kohavi1996, author = {Ron Kohavi}, booktitle = {Second International Conference on Knoledge Discovery and Data Mining}, pages = {202-207}, title = {Scaling Up the Accuracy of Naive-Bayes Classifiers: A Decision-Tree Hybrid}, year = {1996} }Valid options are:
-D If set, classifier is run in debug mode and may output additional info to the console
- 版本:
- $Revision: 1.10 $
- 作者:
- Mark Hall
- 另请参阅:
-
字段概要
从接口继承的字段 weka.core.Drawable
BayesNet, Newick, NOT_DRAWABLE, TREE
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
buildClassifier
(Instances instances) Generates the classifier.double
classifyInstance
(Instance instance) Classifies an instance.final double[]
distributionForInstance
(Instance instance) Returns class probabilities for an instance.Returns an enumeration of the additional measure namesReturns default capabilities of the classifier.double
getMeasure
(String additionalMeasureName) Returns the value of the named measureReturns 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 classifiergraph()
Returns graph describing the tree.int
Returns the type of graph this classifier represents.static void
Main method for testing this classdouble
Returns the number of leavesdouble
Returns the number of rules (same as number of leaves)double
Returns the size of the treetoString()
Returns a description of the classifier.Returns a superconcise version of the model从类继承的方法 weka.classifiers.Classifier
debugTipText, forName, getDebug, getOptions, listOptions, makeCopies, makeCopy, setDebug, setOptions
-
构造器详细资料
-
NBTree
public NBTree()
-
-
方法详细资料
-
globalInfo
Returns a string describing classifier- 返回:
- a description suitable for displaying in the explorer/experimenter 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
Generates the classifier.- 指定者:
buildClassifier
在类中Classifier
- 参数:
instances
- the data to train with- 抛出:
Exception
- if classifier can't be built successfully
-
classifyInstance
Classifies an instance.- 覆盖:
classifyInstance
在类中Classifier
- 参数:
instance
- the instance to classify- 返回:
- the classification
- 抛出:
Exception
- if instance can't be classified successfully
-
distributionForInstance
Returns class probabilities for an instance.- 覆盖:
distributionForInstance
在类中Classifier
- 参数:
instance
- the instance to get the distribution for- 返回:
- the class probabilities
- 抛出:
Exception
- if distribution can't be computed successfully
-
toString
Returns a description of the classifier. -
graphType
public int graphType()Returns the type of graph this classifier represents. -
graph
Returns graph describing the tree. -
toSummaryString
Returns a superconcise version of the model- 指定者:
toSummaryString
在接口中Summarizable
- 返回:
- a description of the model
-
measureTreeSize
public double measureTreeSize()Returns the size of the tree- 返回:
- the size of the tree
-
measureNumLeaves
public double measureNumLeaves()Returns the number of leaves- 返回:
- the number of leaves
-
measureNumRules
public double measureNumRules()Returns the number of rules (same as number of leaves)- 返回:
- the number of rules
-
getMeasure
Returns the value of the named measure- 指定者:
getMeasure
在接口中AdditionalMeasureProducer
- 参数:
additionalMeasureName
- the name of the measure to query for its value- 返回:
- the value of the named measure
- 抛出:
IllegalArgumentException
- if the named measure is not supported
-
enumerateMeasures
Returns an enumeration of the additional measure names- 指定者:
enumerateMeasures
在接口中AdditionalMeasureProducer
- 返回:
- an enumeration of the measure names
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中Classifier
- 返回:
- the revision
-
main
Main method for testing this class- 参数:
argv
- the commandline options
-