|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.classifiers.Classifier
weka.classifiers.bayes.DMNBtext
public class DMNBtext
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.
@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:
-D If set, classifier is run in debug mode and may output additional info to the console
| Nested Class Summary | |
|---|---|
class |
DMNBtext.DNBBinary
|
| Constructor Summary | |
|---|---|
DMNBtext()
|
|
| Method Summary | |
|---|---|
java.lang.String |
binaryWordTipText()
Returns the tip text for this property |
void |
buildClassifier(Instances data)
Generates the classifier. |
double[] |
distributionForInstance(Instance instance)
Calculates the class membership probabilities for the given test instance. |
boolean |
getBinaryWord()
Gets whether use binary text representation |
Capabilities |
getCapabilities()
Returns default capabilities of the classifier. |
int |
getNumIterations()
Gets the number of iterations to be performed |
java.lang.String[] |
getOptions()
Gets the current settings of the classifier. |
java.lang.String |
getRevision()
Returns the revision string. |
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. |
java.lang.String |
globalInfo()
Returns a string describing this classifier |
static void |
main(java.lang.String[] argv)
Main method for testing this class. |
java.lang.String |
numIterationsTipText()
Returns the tip text for this property |
void |
setBinaryWord(boolean val)
Sets whether use binary text representation |
void |
setNumIterations(int numIterations)
Sets the number of iterations to be performed |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
java.lang.String |
toString()
Returns a string representation of the classifier. |
void |
updateClassifier(Instance instance)
Updates the classifier with the given instance. |
| Methods inherited from class weka.classifiers.Classifier |
|---|
classifyInstance, debugTipText, forName, getDebug, listOptions, makeCopies, makeCopy, setDebug |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface weka.core.OptionHandler |
|---|
listOptions |
| Constructor Detail |
|---|
public DMNBtext()
| Method Detail |
|---|
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface TechnicalInformationHandlerpublic Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class ClassifierCapabilities
public void buildClassifier(Instances data)
throws java.lang.Exception
buildClassifier in class Classifierinstances - set of instances serving as training data
java.lang.Exception - if the classifier has not been generated successfully
public void updateClassifier(Instance instance)
throws java.lang.Exception
updateClassifier in interface UpdateableClassifierinstance - the new training instance to include in the model
java.lang.Exception - if the instance could not be incorporated in
the model.
public double[] distributionForInstance(Instance instance)
throws java.lang.Exception
distributionForInstance in class Classifierinstance - the instance to be classified
java.lang.Exception - if there is a problem generating the predictionpublic java.lang.String toString()
toString in class java.lang.Object
public void setOptions(java.lang.String[] options)
throws java.lang.Exception
Classifier
-D
If set, classifier is run in debug mode and
may output additional info to the console.
setOptions in interface OptionHandlersetOptions in class Classifieroptions - the list of options as an array of strings
java.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlergetOptions in class Classifierpublic java.lang.String numIterationsTipText()
public void setNumIterations(int numIterations)
public int getNumIterations()
public java.lang.String binaryWordTipText()
public void setBinaryWord(boolean val)
public boolean getBinaryWord()
public java.lang.String getRevision()
getRevision in interface RevisionHandlerpublic static void main(java.lang.String[] argv)
argv - the options
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||