Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/19106#discussion_r139702788
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/classification/ProbabilisticClassifier.scala
---
@@ -245,6 +244,8 @@ private[ml] object ProbabilisticClassificationModel {
v.values(i) /= sum
i += 1
}
+ } else {
--- End diff --
You can just `require(sum > 0)` at the top instead.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]