Gaussian Naive Bayes (GaussianNB) implementation #19141
Answered
by
jnothman
kpretterhofer
asked this question in
Q&A
Replies: 2 comments 3 replies
-
I would have thought that "naive" implies disregarding covariance.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
"naive" in my assumption references a naive assumption of conditional
independence of features given class.
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
lesteve
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all!
I was playing around with scikit-learn, and also took a look at the Gaussian Naive Bayes implementation.
GaussianNB()
It seems that scikit-learns implementation does not utilize the multivariate gaussian probability density function?
E.g. it does not operate on the feature covariance matrices per class, but on the variances per class.
If I understand the code correctly, it interprets the multivariate case as sum, respectively product of the single univariates, which is just the case if the covariance matrix would be a diagonal matrix.
I am wondering if anyone knows why it is implemented like that, and if the results are as reliable as doing it the other way?
best,
k.
Beta Was this translation helpful? Give feedback.
All reactions