Github user smurching commented on a diff in the pull request: https://github.com/apache/spark/pull/19106#discussion_r137988907 --- Diff: mllib/src/main/scala/org/apache/spark/ml/classification/ProbabilisticClassifier.scala --- @@ -245,6 +245,13 @@ private[ml] object ProbabilisticClassificationModel { v.values(i) /= sum i += 1 } + } else { + var i = 0 + val size = v.size + while (i < size) { + v.values(i) = 1.0 / size --- End diff -- You could use `java.util.Arrays.fill` to update `v.values` in-place, but I'm not sure that it'll make a huge difference.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org