scikit-learn/scikit-learn — pull request #1402 by sjackman (2012-11-24 02:31:56+00:00)
Title: BernoulliNB: Fix the denominator of P(feature | label)

For the Bernoulli Naïve Bayes when calculating feature_log_prob_, I believe the denominator is incorrect. N_c should be the number of data of class c. The probability P(feature | label) should be the number of times that feature is seen in data with that label, divided by the number of data with that label.

Cheers,
Shaun