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

    https://github.com/apache/spark/pull/14216#discussion_r71537647
  
    --- Diff: 
mllib/src/test/scala/org/apache/spark/mllib/stat/MultivariateOnlineSummarizerSuite.scala
 ---
    @@ -245,4 +245,27 @@ class MultivariateOnlineSummarizerSuite extends 
SparkFunSuite {
           absTol 1E-8, "normL2 mismatch")
         assert(summarizer.normL1 ~== Vectors.dense(0.21, 0.4265, 0.61) absTol 
1E-10, "normL1 mismatch")
       }
    +
    +  test("test min/max with weighted samples (SPARK-16561)") {
    +    val summarizer1 = (new MultivariateOnlineSummarizer)
    +      .add(Vectors.dense(10.0, -10.0), 1e10)
    +      .add(Vectors.dense(0.0, 0.0), 1e-10)
    +
    +    val summarizer2 = new MultivariateOnlineSummarizer
    +    summarizer2.add(Vectors.dense(10.0, -10.0), 1e10)
    +    for (i <- 1 to 100)
    +      summarizer2.add(Vectors.dense(0.0, 0.0), 1e-7)
    +
    +    val summarizer3 = new MultivariateOnlineSummarizer
    +    for (i <- 1 to 100)
    +      summarizer3.add(Vectors.dense(0.0, 0.0), 1e-7)
    +    summarizer3.add(Vectors.dense(10.0, -10.0), 1e10)
    +
    +    assert(summarizer1.max ~== Vectors.dense(10.0, 0.0) absTol 1e-14, "max 
mismatch")
    +    assert(summarizer1.min ~== Vectors.dense(0.0, -10.0) absTol 1e-14, 
"max mismatch")
    --- End diff --
    
    The text is wrong but I think you could even omit all of them.


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to