0
$\begingroup$

Does the Naive Bayes algorithm accurately compute P(y|X), i.e., the conditional prob-ability of class given features?

$\endgroup$
0
$\begingroup$

Naive Bayes algorithm makes the "naive" assumption, that the features are (conditionally) independent, so by definition of independence

$$ p(x_1, x_2, \dots, x_k \mid y) = \prod_{i=1}^k p(x_i | y) $$

Answering your question, the estimate of conditional probability would be accurate if the assumption of independence holds (and in real life it almost never does). To give example, say that you want to predict if weather is "bad" given set of meteorological data. By assuming conditional independence, you say that if the weather is "bad" then it the fact that it is very cold is independent of the fact that it is snowing, so if you are told that the weather is bad, then no matter if it is very cold, or extremely hot, the probability that it snows is the same in both cases.

Additionally, for the probabilities to be correct, you would need to use relatively large sample to estimate them precisely, as with any other statistical method.

$\endgroup$
1
  • $\begingroup$ Thank you ;) That was a great answer. It explained the point that I was trying to answer. $\endgroup$ – Marcos Feb 28 '19 at 19:52

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.