Github user zhengruifeng commented on the issue:
https://github.com/apache/spark/pull/15324
I tend to make GaussianNB as a special `modelType` option in current NB.
However, there are significant differences:
1, 'theta' matrix is used to store means
2, extra `sigma` matrix needed to store variance
3, param `smoothing` has no effert, according to [sklearn's
implementation](http://scikit-learn.org/stable/modules/generated/sklearn.naive_bayes.GaussianNB.html#sklearn.naive_bayes.GaussianNB).
To keep current NB design, I think there are two methods to include
GaussianNB:
1, merge `theta` and `sigma` together (you are all against this)
2, update `NaiveBayesModel` and include `sigma` as a extra matrix, and
`sigma` is only meaningful when using GaussianNB
I'm open on this issue, and I will update this PR when we come to a
conclusion.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]