Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am attempting to write the multinomial Naive Bayes Classifier Decision rule as a linear rule. A document is viewed as a sequence $d = (w_1, w_2,\ldots,w_l)$ of $l$ words and is classified as $$h(d) = \operatorname{argmax}_{y\in\{+1,-1\}}P(Y=y)\prod_{i=1}^l P(W=w_i\mid Y=y)$$ Assuming we have estimates for all the appropriate probabilities and none of them are zero, how can we rewrite as $h(d) = \operatorname{sign}(\vec{v}\cdot\vec{x} + b)$? What is $\vec{v}$, $\vec{x}$, and $b$?

share|cite|improve this question

In this generality, it could be almost anything. One possibility that comes to mind is

$$\operatorname{sign}\left(\sum_{y\in\{+1,-1\}}y\,P(Y=y)\prod_{i=1}^{l}P(W=w_i\mid Y=y)\right)\;,$$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.