|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.classify.BinaryClassifier edu.cmu.minorthird.classify.algorithms.linear.NegativeBinomialClassifier
public class NegativeBinomialClassifier
A generative Model for word-counts based on the Negative-Binomial Distribution.
Field Summary |
---|
Fields inherited from class edu.cmu.minorthird.classify.BinaryClassifier |
---|
classifierLearner |
Constructor Summary | |
---|---|
NegativeBinomialClassifier()
|
Method Summary | |
---|---|
java.lang.String |
explain(Instance instance)
Justify inner product of Negative-Binomial Classifier and instance weights. |
java.util.Iterator<Feature> |
featureIterator()
|
Explanation |
getExplanation(Instance instance)
Return an Explanation for the classification |
double |
score(Instance instance)
Inner product of PoissonClassifier and instance weights. |
void |
setPmsNeg(Feature f,
java.util.SortedMap<java.lang.String,java.lang.Double> tmap)
Store parameters for f|negative |
void |
setPmsPos(Feature f,
java.util.SortedMap<java.lang.String,java.lang.Double> tmap)
Store parameters for f|positive |
void |
setPriorNeg(double k,
double n,
double prior,
double pseudoCounts)
Set the prior for negative documents |
void |
setPriorPos(double k,
double n,
double prior,
double pseudoCounts)
Set the prior for positive documents |
void |
setScale(double value)
Set the scale term for the NB classifier to value |
Viewer |
toGUI()
Create a view of this object |
java.lang.String |
toString()
|
Methods inherited from class edu.cmu.minorthird.classify.BinaryClassifier |
---|
classification, getClassifierLearner, setClassifierLearner |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NegativeBinomialClassifier()
Method Detail |
---|
public double score(Instance instance)
score
in class BinaryClassifier
public java.lang.String explain(Instance instance)
explain
in interface Classifier
public Explanation getExplanation(Instance instance)
Classifier
getExplanation
in interface Classifier
public void setScale(double value)
public void setPriorPos(double k, double n, double prior, double pseudoCounts)
public void setPriorNeg(double k, double n, double prior, double pseudoCounts)
public void setPmsNeg(Feature f, java.util.SortedMap<java.lang.String,java.lang.Double> tmap)
public void setPmsPos(Feature f, java.util.SortedMap<java.lang.String,java.lang.Double> tmap)
public java.util.Iterator<Feature> featureIterator()
public Viewer toGUI()
Visible
toGUI
in interface Visible
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |