Skip to content

Naive Bayes has the wrong coef_ and intercept_ #2237

@larsmans

Description

@larsmans

The coef_ and intercept_ on MultinomialNB don't behave like other linear models because they contain probabilities even in the binary case. They should contain log-odds ratios.

The ones in BernoulliNB (not documented) are even worse: they're not the coef and intercept used to make the actual prediction (see BernoulliNB._joint_log_likelihood) so they can't be used for model inspection. This is a hairy issue in terms of backward compat.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions