I am re-asking the question (with the same name) Multinomial Naive Bayes Classifier. That question seems to have accepted an answer which I think is either wrong or I'd like more explanation because I still don't understand.
So far, every Naive Bayes classifier that I've seen in R (including bnlearn and klaR) have implementations that assume that the features have gaussian likelihoods.
Is there an implementation of a Naive Bayes classifier in R that uses multinomial likelihoods (akin to scikit-learn's MultinomialNB)?
In particular -- if it turns out there is some way of calling naive.bayes
in either of these modules so the likelihoods are estimated with a multinomial distribution -- I would really appreciate an example of how that's done. I've searched for examples and haven't found any. For example: is this what the usekernal
argument is for in klaR.NaiveBayes
?
I don't know what algorithm the
predict
method call onnaive.bayes
models but you can calculate the predictions yourself from the conditional probability tables (mle estimates)Using the first example from
naive.bayes
help pageCalculate prediction probabilities from cpt's by running queries - using 'gRain'
So these probabilities are pretty close to what you get from
bnlearn
and are calculated using the mle's,