Github user yanboliang commented on a diff in the pull request:
https://github.com/apache/spark/pull/7672#discussion_r35881182
--- Diff:
mllib/src/test/scala/org/apache/spark/ml/classification/NaiveBayesSuite.scala
---
@@ -46,6 +51,44 @@ class NaiveBayesSuite extends SparkFunSuite with
MLlibTestSparkContext {
assert(model.theta.map(math.exp) ~== thetaData.map(math.exp) absTol
0.05, "theta mismatch")
}
+ def expectedMultinomialProbabilities(model: NaiveBayesModel, feature:
Vector): Vector = {
--- End diff --
Like above, the ml.NaiveBayesModel parameters are all based on Vector and
Matrix which is different from the old one, so I just want to make some
facility test functions on this kinds of model rather than converting it to old
style model.
---
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]