0
$\begingroup$

Suppose we have class C_k and input feature vector x in dataset enter image description here

How to calculate probability p(x)?

$\endgroup$
2
  • $\begingroup$ Do you need p(x)?, note that for classification with Naive Bayes one doesnt need it. $\endgroup$ Mar 14 '20 at 15:17
  • $\begingroup$ Your correct Naive Bayes doesn't need it, therefore, it's a more theoretical question $\endgroup$
    – Hyphen
    Mar 14 '20 at 16:15
2
$\begingroup$

in the Examples section of the Wikipedia article there is a nice example. The calculation of $p(\mathbf{x})$ can be done via

$$p(\mathbf{x}) = \sum_k p(C_k) \ p(\mathbf{x} \mid C_k)$$

Note that using the conditional independence assumption of the Naive Bayes one can write

$$ p(\mathbf{x} \mid C_k) = \Pi_{i} \, p(x_i \mid C_k) $$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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