I'm wondering about the denominator in this computation :

P(Banana|Long, Sweet and Yellow) 
      P(Long|Banana) * P(Sweet|Banana) * P(Yellow|Banana) * P(banana)
    = _______________________________________________________________
                      P(Long) * P(Sweet) * P(Yellow)

Which is from this post

I don't know that it is valid to convert

P(long, sweet, yellow) 



The reason that I'm confused is that we have conditional independence, rather than complete independence.

Or is this valid here?

edit - text example

enter image description here


It isn't correct exactly for the reason you realized. The evidence calculation should be: $$P(L,S,Y)=\sum_{B'\in \{Banana,Orange,Other\}} P(L|B')P(S|B')P(Y|B')P(B')$$

However, the classification is correct because the evidence is not important in Naive Bayes classifier since it is common for all classes.

  • $\begingroup$ Thank you, perhaps the other post should be edited as it seems to be quite popular? ( I found it via google search ). I'm not sure how that works between stacks and whether this suggestion is appropriate $\endgroup$ – baxx Apr 23 at 14:43
  • $\begingroup$ I can post a comment there, but don’t know it’d be effective or not; it’s probably been upvoted by many with elementary probability knowledge. $\endgroup$ – gunes Apr 23 at 14:46

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.