类 DMNBtext

java.lang.Object
weka.classifiers.Classifier
weka.classifiers.bayes.DMNBtext
所有已实现的接口:
Serializable, Cloneable, UpdateableClassifier, CapabilitiesHandler, OptionHandler, RevisionHandler, TechnicalInformationHandler, WeightedInstancesHandler

Class for building and using a Discriminative Multinomial Naive Bayes classifier. For more information see,

Jiang Su,Harry Zhang,Charles X. Ling,Stan Matwin: Discriminative Parameter Learning for Bayesian Networks. In: ICML 2008', 2008.

The core equation for this classifier:

P[Ci|D] = (P[D|Ci] x P[Ci]) / P[D] (Bayes rule)

where Ci is class i and D is a document.

BibTeX:

 @inproceedings{JiangSu2008,
    author = {Jiang Su,Harry Zhang,Charles X. Ling,Stan Matwin},
    booktitle = {ICML 2008'},
    title = {Discriminative Parameter Learning for Bayesian Networks},
    year = {2008}
 }
 

Valid options are:

 -I <iterations>
  The number of iterations that the classifier 
  will scan the training data (default = 1)
 -M
  Use the frequency information in data
版本:
$Revision: 6363 $
作者:
Jiang Su (Jiang.Su@unb.ca) 2008
另请参阅:
  • 构造器详细资料

    • DMNBtext

      public DMNBtext()
  • 方法详细资料

    • globalInfo

      public String globalInfo()
      Returns a string describing this classifier
      返回:
      a description of the classifier 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 data) throws Exception
      Generates the classifier.
      指定者:
      buildClassifier 在类中 Classifier
      参数:
      instances - set of instances serving as training data
      抛出:
      Exception - if the classifier has not been generated successfully
    • updateClassifier

      public void updateClassifier(Instance instance) throws Exception
      Updates the classifier with the given instance.
      指定者:
      updateClassifier 在接口中 UpdateableClassifier
      参数:
      instance - the new training instance to include in the model
      抛出:
      Exception - if the instance could not be incorporated in the model.
    • distributionForInstance

      public double[] distributionForInstance(Instance instance) throws Exception
      Calculates the class membership probabilities for the given test instance.
      覆盖:
      distributionForInstance 在类中 Classifier
      参数:
      instance - the instance to be classified
      返回:
      predicted class probability distribution
      抛出:
      Exception - if there is a problem generating the prediction
    • toString

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

      public Enumeration<Option> listOptions()
      Returns an enumeration describing the available options.
      指定者:
      listOptions 在接口中 OptionHandler
      覆盖:
      listOptions 在类中 Classifier
      返回:
      an enumeration of all the available options.
    • setOptions

      public void setOptions(String[] options) throws Exception
      从类复制的说明: Classifier
      Parses a given list of options. Valid options are:

      -D
      If set, classifier is run in debug mode and may output additional info to the console.

      指定者:
      setOptions 在接口中 OptionHandler
      覆盖:
      setOptions 在类中 Classifier
      参数:
      options - the list of options as an array of strings
      抛出:
      Exception - if an option is not supported
    • getOptions

      public String[] getOptions()
      Gets the current settings of the classifier.
      指定者:
      getOptions 在接口中 OptionHandler
      覆盖:
      getOptions 在类中 Classifier
      返回:
      an array of strings suitable for passing to setOptions
    • numIterationsTipText

      public String numIterationsTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • setNumIterations

      public void setNumIterations(int numIterations)
      Sets the number of iterations to be performed
    • getNumIterations

      public int getNumIterations()
      Gets the number of iterations to be performed
      返回:
      the iterations to be performed
    • multinomialWordTipText

      public String multinomialWordTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • setMultinomialWord

      public void setMultinomialWord(boolean val)
      Sets whether use binary text representation
    • getMultinomialWord

      public boolean getMultinomialWord()
      Gets whether use binary text representation
      返回:
      whether use binary text representation
    • 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 options