类 NBTree

java.lang.Object
weka.classifiers.Classifier
weka.classifiers.trees.NBTree
所有已实现的接口:
Serializable, Cloneable, AdditionalMeasureProducer, CapabilitiesHandler, Drawable, OptionHandler, RevisionHandler, Summarizable, TechnicalInformationHandler, WeightedInstancesHandler

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:

 @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
另请参阅:
  • 构造器详细资料

    • NBTree

      public NBTree()
  • 方法详细资料

    • globalInfo

      public String globalInfo()
      Returns a string describing classifier
      返回:
      a description suitable for displaying in the explorer/experimenter gui
    • getTechnicalInformation

      public 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.
      指定者:
      getTechnicalInformation 在接口中 TechnicalInformationHandler
      返回:
      the technical information about this class
    • getCapabilities

      public Capabilities getCapabilities()
      Returns default capabilities of the classifier.
      指定者:
      getCapabilities 在接口中 CapabilitiesHandler
      覆盖:
      getCapabilities 在类中 Classifier
      返回:
      the capabilities of this classifier
      另请参阅:
    • buildClassifier

      public void buildClassifier(Instances instances) throws Exception
      Generates the classifier.
      指定者:
      buildClassifier 在类中 Classifier
      参数:
      instances - the data to train with
      抛出:
      Exception - if classifier can't be built successfully
    • classifyInstance

      public double classifyInstance(Instance instance) throws Exception
      Classifies an instance.
      覆盖:
      classifyInstance 在类中 Classifier
      参数:
      instance - the instance to classify
      返回:
      the classification
      抛出:
      Exception - if instance can't be classified successfully
    • distributionForInstance

      public final double[] distributionForInstance(Instance instance) throws Exception
      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

      public String toString()
      Returns a description of the classifier.
      覆盖:
      toString 在类中 Object
      返回:
      a string representation of the classifier
    • graphType

      public int graphType()
      Returns the type of graph this classifier represents.
      指定者:
      graphType 在接口中 Drawable
      返回:
      Drawable.TREE
    • graph

      public String graph() throws Exception
      Returns graph describing the tree.
      指定者:
      graph 在接口中 Drawable
      返回:
      the graph describing the tree
      抛出:
      Exception - if graph can't be computed
    • toSummaryString

      public String 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

      public double getMeasure(String additionalMeasureName)
      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

      public Enumeration enumerateMeasures()
      Returns an enumeration of the additional measure names
      指定者:
      enumerateMeasures 在接口中 AdditionalMeasureProducer
      返回:
      an enumeration of the measure names
    • getRevision

      public String getRevision()
      Returns the revision string.
      指定者:
      getRevision 在接口中 RevisionHandler
      覆盖:
      getRevision 在类中 Classifier
      返回:
      the revision
    • main

      public static void main(String[] argv)
      Main method for testing this class
      参数:
      argv - the commandline options