类 DMNBtext
java.lang.Object
weka.classifiers.Classifier
weka.classifiers.bayes.DMNBtext
- 所有已实现的接口:
Serializable
,Cloneable
,UpdateableClassifier
,CapabilitiesHandler
,OptionHandler
,RevisionHandler
,TechnicalInformationHandler
,WeightedInstancesHandler
public class DMNBtext
extends Classifier
implements OptionHandler, WeightedInstancesHandler, TechnicalInformationHandler, UpdateableClassifier
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:
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
- 另请参阅:
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
buildClassifier
(Instances data) Generates the classifier.double[]
distributionForInstance
(Instance instance) Calculates the class membership probabilities for the given test instance.Returns default capabilities of the classifier.boolean
Gets whether use binary text representationint
Gets the number of iterations to be performedString[]
Gets the current settings 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 this classifierReturns an enumeration describing the available options.static void
Main method for testing this class.Returns the tip text for this propertyReturns the tip text for this propertyvoid
setMultinomialWord
(boolean val) Sets whether use binary text representationvoid
setNumIterations
(int numIterations) Sets the number of iterations to be performedvoid
setOptions
(String[] options) Parses a given list of options.toString()
Returns a string representation of the classifier.void
updateClassifier
(Instance instance) Updates the classifier with the given instance.从类继承的方法 weka.classifiers.Classifier
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug
-
构造器详细资料
-
DMNBtext
public DMNBtext()
-
-
方法详细资料
-
globalInfo
Returns a string describing this classifier- 返回:
- a description of the classifier 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
- set of instances serving as training data- 抛出:
Exception
- if the classifier has not been generated successfully
-
updateClassifier
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
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
Returns a string representation of the classifier. -
listOptions
Returns an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 覆盖:
listOptions
在类中Classifier
- 返回:
- an enumeration of all the available options.
-
setOptions
从类复制的说明: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
Gets the current settings of the classifier.- 指定者:
getOptions
在接口中OptionHandler
- 覆盖:
getOptions
在类中Classifier
- 返回:
- an array of strings suitable for passing to setOptions
-
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
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
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中Classifier
- 返回:
- the revision
-
main
Main method for testing this class.- 参数:
argv
- the options
-