Description Usage Arguments Details Value Examples
Multinomial Naive Bayes is a specialized version of Naive Bayes that is designed more for text documents Multinomial model generates one term from the vocabulary in each position of the document Whereas simple naive Bayes would model a document as the presence and absence of particular words, multinomial naive bayes explicitly models the word counts relevance in particular class / per all words in a class
1 | fit.nb.multinomial(data, fact)
|
data |
data.frame contains values of our training set (bag-of-words format of text) |
fact |
factor containing proper classification of the training samples in data set (one per observation) |
More information about the method can be found http://www.cs.cmu.edu/~knigam/papers/multinomial-aaaiws98.pdf More information about algorithm can be found in the book Introduction to Information Retrieval (p.253-265)
object of the class mcTmnb to use in predict function
1 | fit.nb.multinomial(train.data, label)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.