Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/19106#discussion_r138135778
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/classification/ProbabilisticClassifier.scala
---
@@ -245,6 +245,10 @@ private[ml] object ProbabilisticClassificationModel {
v.values(i) /= sum
i += 1
}
+ } else {
+ var i = 0
+ val size = v.size
+ java.util.Arrays.fill(v.values, 1.0 / size)
--- End diff --
Import this, while you're at it.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]