Github user dbtsai commented on a diff in the pull request:
https://github.com/apache/spark/pull/1425#discussion_r15013786
--- Diff:
mllib/src/test/scala/org/apache/spark/mllib/evaluation/BinaryClassificationMetricsSuite.scala
---
@@ -20,8 +20,20 @@ package org.apache.spark.mllib.evaluation
import org.scalatest.FunSuite
import org.apache.spark.mllib.util.LocalSparkContext
+import org.apache.spark.mllib.util.TestingUtils._
class BinaryClassificationMetricsSuite extends FunSuite with
LocalSparkContext {
+
+ implicit class SeqDoubleWithAlmostEquals(val x: Seq[Double]) {
+ def almostEquals(y: Seq[Double], eps: Double = 1E-6): Boolean =
--- End diff --
Yeah, for one ulp, it might be 10e-15. Lots of time, I manually type the
numbers or just copy the first couple dights of numbers to save the line space,
so that's why I chose 1.0e-6. Thus, I can just type around 7 digits of numbers.
I agree with you that in this case, we may want to explicitly specify with
larger epsilon.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---