|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.classify.OnlineClassifierLearner edu.cmu.minorthird.classify.OnlineBinaryClassifierLearner edu.cmu.minorthird.classify.algorithms.linear.NaiveBayes
public class NaiveBayes
Naive Bayes algorithm. If feature weights are word counts then this implements the usual multinomial naive Bayes. If feature weights are presence/absence this implements binomial naive Bayes.
Constructor Summary | |
---|---|
NaiveBayes()
|
Method Summary | |
---|---|
void |
addExample(Example example)
Subclasses should use this method to perform whatever incremental update is needed after in response to a new example. |
Classifier |
getClassifier()
Subclasses should use this method to return the current classifier. |
void |
reset()
'forget' everything about the last learning task, and start a new task. |
java.lang.String |
toString()
|
Methods inherited from class edu.cmu.minorthird.classify.OnlineBinaryClassifierLearner |
---|
getBinaryClassifier, getSchema, setSchema |
Methods inherited from class edu.cmu.minorthird.classify.OnlineClassifierLearner |
---|
completeTraining, copy, hasNextQuery, nextQuery, setInstancePool |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.cmu.minorthird.classify.ClassifierLearner |
---|
completeTraining, copy, hasNextQuery, nextQuery, setInstancePool |
Constructor Detail |
---|
public NaiveBayes()
Method Detail |
---|
public void reset()
OnlineClassifierLearner
reset
in interface ClassifierLearner
reset
in class OnlineClassifierLearner
public void addExample(Example example)
OnlineClassifierLearner
addExample
in interface ClassifierLearner
addExample
in class OnlineClassifierLearner
public Classifier getClassifier()
OnlineClassifierLearner
getClassifier
in interface ClassifierLearner
getClassifier
in class OnlineClassifierLearner
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 |