You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by srowen <gi...@git.apache.org> on 2017/10/09 11:47:00 UTC

[GitHub] spark pull request #19106: [SPARK-21770][ML] ProbabilisticClassificationMode...

Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19106#discussion_r143445232
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/classification/ProbabilisticClassifier.scala ---
    @@ -230,21 +230,22 @@ private[ml] object ProbabilisticClassificationModel {
        * Normalize a vector of raw predictions to be a multinomial probability vector, in place.
        *
        * The input raw predictions should be nonnegative.
    -   * The output vector sums to 1, unless the input vector is all-0 (in which case the output is
    -   * all-0 too).
    +   * The output vector sums to 1.
        *
        * NOTE: This is NOT applicable to all models, only ones which effectively use class
        *       instance counts for raw predictions.
        */
    +  @throws[IllegalArgumentException]("If the input vector is all-0 or including negative values")
    --- End diff --
    
    IllegalArgumentException is unchecked, so you don't need a `@throws` annotation even in Java. I was referring to a simple scaladoc tag.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org