spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkbradley <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-4256] Make Binary Evaluation Metrics fu...
Date Fri, 07 Nov 2014 00:05:20 GMT
Github user jkbradley commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3118#discussion_r19986233
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/evaluation/binary/BinaryClassificationMetricComputers.scala
---
    @@ -27,19 +27,31 @@ private[evaluation] trait BinaryClassificationMetricComputer extends
Serializabl
     /** Precision. */
     private[evaluation] object Precision extends BinaryClassificationMetricComputer {
       override def apply(c: BinaryConfusionMatrix): Double =
    -    c.numTruePositives.toDouble / (c.numTruePositives + c.numFalsePositives)
    +    if (c.numTruePositives + c.numFalsePositives == 0) {
    --- End diff --
    
    Use another variable for brevity?
    ```
    val totalPositives = c.numTruePositives + c.numFalsePositives
    ```



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message