1
$\begingroup$

Naive Bayes assumes that the features given their classes are independent, and hence :

$$P(y~|~x_1, \ldots, x_n)= \frac{P(y)P(x_1,\ldots, x_n~|~ y) }{P(x_1,\ldots,x_n)}$$ Will become :

$$ P(y~|~ x_1,\ldots,x_n) =\frac{P(y)\prod_{i=1}^n P(x_i~| ~y)}{P(x_1,\ldots,x_n)}$$ That is, due to the assumption that the features conditioned to their class are independent, then we have multiplied each feature conditioned to its class by the other. My question is, if the features are dependent then what is the right way to calculated the features conditioned to their class ?

$\endgroup$
1
  • $\begingroup$ There is no right or wrong way. Naïve Bayes is an approximation that is used to solve problems that may be intractable (or intractable in realistic time or with the available computational resources.) $\endgroup$
    – Roger V.
    Commented Oct 12, 2022 at 7:54

1 Answer 1

3
$\begingroup$

Even under the Naive Bayes condition, features can be dependent. It is conditioned on the class that the features have to be independent. And if the class conditionals are not independent, your first formula cannot be transformed into the convenient second one. I.e., $p(x_1, \ldots, x_n | y)$ cannot be factorized and you have to try some of the many other classification techniques.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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