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: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to