So far, I have seen two ways of writing multinomial NB, I was wondering which would be the correct one to use in theory?

Example:

Suppose we are going to classify the sentence

We are going really really fast

Methods:

In terms of the likelihood, the two methods are described as the follows

  1. $P(we, are, going, really, really, fast|C_k) \\= P(we|C_k) P(are|C_k) P(going|C_k)P(really|C_k) P(really|C_k) P(fast|C_k)$

  2. $P(we, are, going, really, really, fast|C_k) \\= P(we=1,are=1,going=1,really=2,fast=1|C_k) \\= \frac{6!}{2!} P(we|C_k) P(are|C_k) P(going|C_k)P(really|C_k)^2 P(fast|C_k)$

Difference:

The difference is whether it has the coefficient item of multinomial distribution. The coefficient measures the order effects.

In method one, the order matters, since we are not considering permutations of words, we are interested in only one particular word combination (the natural order).

However, for the second method, the order doesn't matter. We are counting the word occurrences, any permutations satisfy the counts would be taken into consideration.

I am confused as they seem like to be the same method, but missing the coefficient made them like two distinct methods. How should I understand such difference?

  • It depends what kind of features you'll provide for the algorithm (counts vs any occurrence). – Tim Jun 25 at 7:27
  • Which one satisfy multinomial distribution, counts or occurrence or both? Counts make much sense to me to be categorized as multinomial distribution, you have events which are the counts and some probability associated with that event. Regarding the occurrence, I'm not sure what is probability distribution of a series of words (the indication of chain multiplication). – Logan Jun 25 at 8:02
  • Your question seems to be about this coefficient 6!/2!... but I wonder about what is $P(x|C_k)$ ? why can you multiply these terms without taking into account correlations? Why do you not use en.wikipedia.org/wiki/Chain_rule_(probability) ? – Martijn Weterings Jun 25 at 20:35
  • NB has strong independence assumptions between features. – Logan Jun 26 at 1:41
  • You've already pointed out that they are two different methods, as in one, the order matters, and in the other, it doesn't. So why are you confused "as they seem like to be the same method"? You already know they aren't, and why not! – jbowman Jul 2 at 2:59

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.