You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by dongjoon-hyun <gi...@git.apache.org> on 2016/05/31 05:25:15 UTC

[GitHub] spark pull request: [SPARK-15660][CORE] RDD and Dataset should sho...

GitHub user dongjoon-hyun opened a pull request:

    https://github.com/apache/spark/pull/13403

    [SPARK-15660][CORE] RDD and Dataset should show the consistent values for variance/stdev.

    ## What changes were proposed in this pull request?
    
    In Spark-11490, `variance/stdev` are redefined as the **sample** `variance/stdev` instead of population ones. This PR addresses the only remaining legacy in RDD. This may cause breaking changes, but we had better be consistent in Spark 2.0 if possible. This PR also `popVariance` and `popStdev` functions.
    
    ```scala
    scala> val rdd = sc.parallelize(Seq(1.0, 2.0, 3.0))
    rdd: org.apache.spark.rdd.RDD[Double] = ParallelCollectionRDD[0] at parallelize at <console>:24
    
    scala> rdd.stdev
    res0: Double = 0.816496580927726                                                
    
    scala> rdd.toDS().describe().show()
    16/05/30 22:20:12 WARN ObjectStore: Version information not found in metastore. hive.metastore.schema.verification is not enabled so recording the schema version 1.2.0
    16/05/30 22:20:12 WARN ObjectStore: Failed to get database default, returning NoSuchObjectException
    +-------+-----+
    |summary|value|
    +-------+-----+
    |  count|    3|
    |   mean|  2.0|
    | stddev|  1.0|
    |    min|  1.0|
    |    max|  3.0|
    +-------+-----+
    ```
    
    ## How was this patch tested?
    
    Pass the updated Jenkins tests.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dongjoon-hyun/spark SPARK-15660

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/13403.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #13403
    
----
commit 3fe0cb6024ba44b1645bc74f1fbe29267571caa0
Author: Dongjoon Hyun <do...@apache.org>
Date:   2016-05-31T05:22:16Z

    [SPARK-15660][CORE] RDD and Dataset should show the consistent value for variance/stdev.

----


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #61106 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/61106/consoleFull)** for PR 13403 at commit [`bb12a7f`](https://github.com/apache/spark/commit/bb12a7f8504755a645994b13180a5b809aa007b5).


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


[GitHub] spark pull request: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the pull request:

    https://github.com/apache/spark/pull/13403
  
    Thank you for review, @srowen .


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


[GitHub] spark pull request: [SPARK-15660][CORE] RDD and Dataset should sho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/13403#issuecomment-222595435
  
    **[Test build #59637 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/59637/consoleFull)** for PR 13403 at commit [`3fe0cb6`](https://github.com/apache/spark/commit/3fe0cb6024ba44b1645bc74f1fbe29267571caa0).


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #60715 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60715/consoleFull)** for PR 13403 at commit [`e41561e`](https://github.com/apache/spark/commit/e41561ec0cda42978d32b3758a2bc57be81f2671).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/60496/
    Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #60195 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60195/consoleFull)** for PR 13403 at commit [`f999c8c`](https://github.com/apache/spark/commit/f999c8cf6e962c7fe36d9ef98e8cad4fa25c340e).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Merged build finished. Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #59979 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/59979/consoleFull)** for PR 13403 at commit [`ffff801`](https://github.com/apache/spark/commit/ffff801244d24b8b8f250dac34b21b1ea3245981).


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r67822577
  
    --- Diff: core/src/test/java/org/apache/spark/JavaAPISuite.java ---
    @@ -733,8 +733,10 @@ public Boolean call(Double x) {
         assertEquals(20/6.0, rdd.mean(), 0.01);
         assertEquals(20/6.0, rdd.mean(), 0.01);
         assertEquals(6.22222, rdd.variance(), 0.01);
    +    assertEquals(rdd.variance(), rdd.popVariance(), 0.01);
    --- End diff --
    
    I think these need to assert exact equality; there's no reason that they would ever be different at all.


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r67597273
  
    --- Diff: core/src/test/scala/org/apache/spark/PartitioningSuite.scala ---
    @@ -244,6 +244,10 @@ class PartitioningSuite extends SparkFunSuite with SharedSparkContext with Priva
         assert(abs(6.0/2 - rdd.mean) < 0.01)
         assert(abs(1.0 - rdd.variance) < 0.01)
         assert(abs(1.0 - rdd.stdev) < 0.01)
    +    assert(abs(1.0 - rdd.popVariance) < 0.01)
    --- End diff --
    
    That sounds better since it's more explicit.


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


[GitHub] spark pull request: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the pull request:

    https://github.com/apache/spark/pull/13403
  
    Yeah I find this surprising too. As far as I know, databases tend to treat stddev as the sample stddev -- except Hive for some reason, AFAIK. I've never quite understood the theoretical motivation for that. Maybe the idea is that the aggregate is typically over some projection, or subset, of all data. But to me, the default should logically be population stdev, since there's no inherent reason to believe the result set is not the entire population of interest.
    
    For RDDs, it seems even clearer that the behavior should be population stddev.
    For Datasets, maybe it's less surprising to do what databases usually do.
    
    It does bear documentation for sure, but maybe not changing the behavior.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #60771 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60771/consoleFull)** for PR 13403 at commit [`15938b3`](https://github.com/apache/spark/commit/15938b38e1a76be2dd4f749e72084568af9c9600).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Merged build finished. Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Merged build finished. Test PASSed.


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r67931118
  
    --- Diff: core/src/test/scala/org/apache/spark/PartitioningSuite.scala ---
    @@ -244,6 +244,10 @@ class PartitioningSuite extends SparkFunSuite with SharedSparkContext with Priva
         assert(abs(6.0/2 - rdd.mean) < 0.01)
         assert(abs(1.0 - rdd.variance) < 0.01)
         assert(abs(1.0 - rdd.stdev) < 0.01)
    +    assert(abs(rdd.variance - rdd.popVariance) < 1e-14)
    +    assert(abs(rdd.stdev - rdd.popStdev) < 1e-14)
    +    assert(abs(2.0 - rdd.sampleVariance) < 0.01)
    --- End diff --
    
    Yep.


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


[GitHub] spark pull request: [SPARK-15660][CORE] RDD and Dataset should sho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/13403#issuecomment-222609977
  
    **[Test build #59637 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/59637/consoleFull)** for PR 13403 at commit [`3fe0cb6`](https://github.com/apache/spark/commit/3fe0cb6024ba44b1645bc74f1fbe29267571caa0).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Thank you for reviewing this PR, @mengxr and @srowen !


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r68007866
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/DoubleRDDFunctions.scala ---
    @@ -74,6 +74,20 @@ class DoubleRDDFunctions(self: RDD[Double]) extends Logging with Serializable {
       }
     
       /**
    +   * Compute the population standard deviation of this RDD's elements.
    +   */
    +  def popStdev(): Double = self.withScope {
    --- End diff --
    
    I agree with you. I'll add `@since 2.0.0` here.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Thank you for everything, @srowen , @mengxr , @rxin .


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Merged build finished. Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Merged build finished. Test PASSed.


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r68184371
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/DoubleRDDFunctions.scala ---
    @@ -74,6 +74,22 @@ class DoubleRDDFunctions(self: RDD[Double]) extends Logging with Serializable {
       }
     
       /**
    +   * Compute the population standard deviation of this RDD's elements.
    +   * @since 2.1.0
    --- End diff --
    
    We need to use the Scala `@Since` annotation. Have a look how this is annotated elsewhere in Scala. For Java, yeah, we only use the `@since` javadoc tag because that's all that is available.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    OK, I suppose it's either down the over, or over then down in the API. Either way is consistent with something.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Hi, @srowen .
    Now, I fixed them all. Sorry for missing those.


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


[GitHub] spark pull request: [SPARK-15660][CORE] RDD and Dataset should sho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/13403#issuecomment-222610155
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/59637/
    Test PASSed.


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by mengxr <gi...@git.apache.org>.
Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r67928879
  
    --- Diff: core/src/test/scala/org/apache/spark/PartitioningSuite.scala ---
    @@ -244,6 +244,10 @@ class PartitioningSuite extends SparkFunSuite with SharedSparkContext with Priva
         assert(abs(6.0/2 - rdd.mean) < 0.01)
         assert(abs(1.0 - rdd.variance) < 0.01)
         assert(abs(1.0 - rdd.stdev) < 0.01)
    +    assert(abs(rdd.variance - rdd.popVariance) < 1e-14)
    +    assert(abs(rdd.stdev - rdd.popStdev) < 1e-14)
    +    assert(abs(2.0 - rdd.sampleVariance) < 0.01)
    --- End diff --
    
    The tolerance should be smaller too.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/59793/
    Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/60716/
    Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #60948 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60948/consoleFull)** for PR 13403 at commit [`cb10b9c`](https://github.com/apache/spark/commit/cb10b9cd3ab885740f9c0864f296723afc2b3d23).


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


[GitHub] spark pull request: [SPARK-15660][CORE] RDD and Dataset should sho...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/13403#issuecomment-222612252
  
    hm I think we probably don't want to change the behavior of this to not surprise people ...



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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #59979 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/59979/consoleFull)** for PR 13403 at commit [`ffff801`](https://github.com/apache/spark/commit/ffff801244d24b8b8f250dac34b21b1ea3245981).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #61106 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/61106/consoleFull)** for PR 13403 at commit [`bb12a7f`](https://github.com/apache/spark/commit/bb12a7f8504755a645994b13180a5b809aa007b5).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/61106/
    Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Hi, @rxin and @srowen .
    Now, I update this PR like the following.
    
    1. Update the documentation of legacy Scala/Java API more clearly
    2. Add `popVariance/popStdev` functions explicitly
    
    Could you give me some feedback?


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #60948 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60948/consoleFull)** for PR 13403 at commit [`cb10b9c`](https://github.com/apache/spark/commit/cb10b9cd3ab885740f9c0864f296723afc2b3d23).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/60948/
    Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #60716 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60716/consoleFull)** for PR 13403 at commit [`602e236`](https://github.com/apache/spark/commit/602e236ee66153ad6247c4c024323a4eb5d009c6).


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Although we can not change old API, I think it's a good idea to add `popVariance` and `popStdev` clearly.
    
    If everything in this PR is now allowed, what about just adding an explicit note on old `StatCounter.variance` and `StatCounter.stdev`?
    
    http://spark.apache.org/docs/2.0.0-preview/api/scala/index.html#org.apache.spark.util.StatCounter
    



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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #60946 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60946/consoleFull)** for PR 13403 at commit [`aeb4888`](https://github.com/apache/spark/commit/aeb4888aeb64edda34c9505e7eae6cc7c32fcfaa).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #60938 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60938/consoleFull)** for PR 13403 at commit [`4f0fc8a`](https://github.com/apache/spark/commit/4f0fc8af902ebc40693daba9ffd2666763960be5).


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


[GitHub] spark pull request: [SPARK-15660][CORE] RDD and Dataset should sho...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the pull request:

    https://github.com/apache/spark/pull/13403#issuecomment-222614982
  
    Thank you for review again @rxin. 
    
    Actually, I fully understand and expect your decision.
    The reason why I making this issue is I think we need explicit discussions and the conclusion for this issue.
    
    I worried that Spark shows this inconsistency forever implicitly. As we know, if we do not this in Spark 2.0, this will happen on Spark 3.0 or maybe never because of the same reason.


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r67822629
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/DoubleRDDFunctions.scala ---
    @@ -47,12 +47,12 @@ class DoubleRDDFunctions(self: RDD[Double]) extends Logging with Serializable {
         stats().mean
       }
     
    -  /** Compute the variance of this RDD's elements. */
    +  /** Compute the population variance of this RDD's elements. */
       def variance(): Double = self.withScope {
         stats().variance
       }
     
    -  /** Compute the standard deviation of this RDD's elements. */
    +  /** Compute the population standard deviation of this RDD's elements. */
       def stdev(): Double = self.withScope {
    --- End diff --
    
    One last tweak: these methods should call the "pop" equivalents rather than implement the same thing twice, even though it's so simple.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Oh, thank you, @mengxr !
    I'll update again.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Merged build finished. Test PASSed.


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r67597151
  
    --- Diff: core/src/main/scala/org/apache/spark/util/StatCounter.scala ---
    @@ -125,9 +128,12 @@ class StatCounter(values: TraversableOnce[Double]) extends Serializable {
         }
       }
     
    -  /** Return the standard deviation of the values. */
    +  /** Return the population standard deviation of the values. */
       def stdev: Double = math.sqrt(variance)
    --- End diff --
    
    For consistency, this can call popStdev?


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Thank you so much for your review, @srowen !
    I updated the PR according to your comments.


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r67567009
  
    --- Diff: core/src/main/scala/org/apache/spark/util/StatCounter.scala ---
    @@ -104,8 +104,11 @@ class StatCounter(values: TraversableOnce[Double]) extends Serializable {
     
       def min: Double = minValue
     
    -  /** Return the variance of the values. */
    -  def variance: Double = {
    +  /** Return the population variance of the values. */
    +  def variance: Double = popVariance
    --- End diff --
    
    Here is the only changed part of legacy code.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/59979/
    Test PASSed.


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r68008205
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/DoubleRDDFunctions.scala ---
    @@ -74,6 +74,20 @@ class DoubleRDDFunctions(self: RDD[Double]) extends Logging with Serializable {
       }
     
       /**
    +   * Compute the population standard deviation of this RDD's elements.
    +   */
    +  def popStdev(): Double = self.withScope {
    --- End diff --
    
    Sorry, I fixed the previous comment.


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r67931444
  
    --- Diff: core/src/test/scala/org/apache/spark/PartitioningSuite.scala ---
    @@ -244,6 +244,10 @@ class PartitioningSuite extends SparkFunSuite with SharedSparkContext with Priva
         assert(abs(6.0/2 - rdd.mean) < 0.01)
         assert(abs(1.0 - rdd.variance) < 0.01)
         assert(abs(1.0 - rdd.stdev) < 0.01)
    +    assert(abs(rdd.variance - rdd.popVariance) < 1e-14)
    +    assert(abs(rdd.stdev - rdd.popStdev) < 1e-14)
    +    assert(abs(2.0 - rdd.sampleVariance) < 0.01)
    +    assert(abs(1.41 - rdd.sampleStdev) < 0.01)
    --- End diff --
    
    Right. I'll fix that like `assert(abs(Math.sqrt(2.0) - rdd.sampleStdev) < 1e-14)`, too.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/60026/
    Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/60938/
    Test FAILed.


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r68188989
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/DoubleRDDFunctions.scala ---
    @@ -74,6 +74,22 @@ class DoubleRDDFunctions(self: RDD[Double]) extends Logging with Serializable {
       }
     
       /**
    +   * Compute the population standard deviation of this RDD's elements.
    +   * @since 2.1.0
    --- End diff --
    
    Sure. No doubt about that.
    I'm just curious whether we need to replace them someday.
    Anyway, I'm almost fixed.


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by mengxr <gi...@git.apache.org>.
Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r67928887
  
    --- Diff: core/src/test/scala/org/apache/spark/PartitioningSuite.scala ---
    @@ -244,6 +244,10 @@ class PartitioningSuite extends SparkFunSuite with SharedSparkContext with Priva
         assert(abs(6.0/2 - rdd.mean) < 0.01)
         assert(abs(1.0 - rdd.variance) < 0.01)
         assert(abs(1.0 - rdd.stdev) < 0.01)
    +    assert(abs(rdd.variance - rdd.popVariance) < 1e-14)
    +    assert(abs(rdd.stdev - rdd.popStdev) < 1e-14)
    +    assert(abs(2.0 - rdd.sampleVariance) < 0.01)
    +    assert(abs(1.41 - rdd.sampleStdev) < 0.01)
    --- End diff --
    
    Is it `sqrt(2)`?


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #60026 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60026/consoleFull)** for PR 13403 at commit [`ae5fb7a`](https://github.com/apache/spark/commit/ae5fb7ab466015d4968518a31d7bc6bf36cdf33e).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    What about just adding an explicit note on old `StatCounter.stdev`?
    
    http://spark.apache.org/docs/2.0.0-preview/api/scala/index.html#org.apache.spark.util.StatCounter
    
    MLLIB `stat.Statistics` is also consistent with `Dataset`. 
    ```
    scala> import org.apache.spark.mllib.linalg.Vectors
    scala> import org.apache.spark.mllib.stat.{MultivariateStatisticalSummary, Statistics}
    scala> Statistics.colStats(sc.parallelize(Seq(Vectors.dense(1.0),Vectors.dense(2.0),Vectors.dense(3.0)))).variance
    res10: org.apache.spark.mllib.linalg.Vector = [1.0]
    ```


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Merged to master


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Ping~


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r68188408
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/DoubleRDDFunctions.scala ---
    @@ -74,6 +74,22 @@ class DoubleRDDFunctions(self: RDD[Double]) extends Logging with Serializable {
       }
     
       /**
    +   * Compute the population standard deviation of this RDD's elements.
    +   * @since 2.1.0
    --- End diff --
    
    It's valid, though I don't think we generally use them. I would just use the `@Since` tag along in Scala, since it is processed differently on purpose.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #60946 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60946/consoleFull)** for PR 13403 at commit [`aeb4888`](https://github.com/apache/spark/commit/aeb4888aeb64edda34c9505e7eae6cc7c32fcfaa).


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #60715 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60715/consoleFull)** for PR 13403 at commit [`e41561e`](https://github.com/apache/spark/commit/e41561ec0cda42978d32b3758a2bc57be81f2671).


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


[GitHub] spark pull request: [SPARK-15660][CORE] RDD and Dataset should sho...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the pull request:

    https://github.com/apache/spark/pull/13403#issuecomment-222648543
  
    Hi, @rxin . 
    I updated the example more practically by using **SparkSession.createDataset().rdd.stdev**.
    If we must preserve the current behavior for backward compatibility, what about adding notes somewhere about the inconsistency for new users?


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    CC @mengxr @jkbradley I'd kinda like to have this for 2.0.0 for completeness.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #60026 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60026/consoleFull)** for PR 13403 at commit [`ae5fb7a`](https://github.com/apache/spark/commit/ae5fb7ab466015d4968518a31d7bc6bf36cdf33e).


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Hi, @mengxr .
    I updated them to use accurate values and small tolerances, too.
    ```
    -    assert(abs(2.0 - rdd.sampleVariance) < 0.01)
    -    assert(abs(1.41 - rdd.sampleStdev) < 0.01)
    +    assert(abs(2.0 - rdd.sampleVariance) < 1e-14)
    +    assert(abs(Math.sqrt(2.0) - rdd.sampleStdev) < 1e-14)
    ```


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Merged build finished. Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #60950 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60950/consoleFull)** for PR 13403 at commit [`3a6396e`](https://github.com/apache/spark/commit/3a6396e8a475fd31245f03050565f1e9c60da986).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/60195/
    Test PASSed.


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r67903762
  
    --- Diff: core/src/test/java/org/apache/spark/JavaAPISuite.java ---
    @@ -733,8 +733,10 @@ public Boolean call(Double x) {
         assertEquals(20/6.0, rdd.mean(), 0.01);
         assertEquals(20/6.0, rdd.mean(), 0.01);
         assertEquals(6.22222, rdd.variance(), 0.01);
    +    assertEquals(rdd.variance(), rdd.popVariance(), 0.01);
    --- End diff --
    
    I agree!


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Rebased.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Thank you, @srowen . 
    I updated the PR according to one of your advices. 
    
    For the other advice, I tried like the following. It looks good, but a little bit inconsistent with the remaining parts of the codes.
    ```
       /** Compute the population variance of this RDD's elements. */
    -  def variance(): Double = self.withScope {
    -    stats().variance
    -  }
    +  def variance(): Double = popVariance
     
       /** Compute the population standard deviation of this RDD's elements. */
    -  def stdev(): Double = self.withScope {
    -    stats().stdev
    -  }
    +  def stdev(): Double = popStdev
    ```
    
    It's because the functions of `DoubleRDDFunctions.scala` and `JavaDoubleRDD.scala` simply forwards to their correspondents. May I keep the corrent logic for this?


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Merged build finished. Test FAILed.


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r67922312
  
    --- Diff: core/src/test/scala/org/apache/spark/PartitioningSuite.scala ---
    @@ -244,6 +244,10 @@ class PartitioningSuite extends SparkFunSuite with SharedSparkContext with Priva
         assert(abs(6.0/2 - rdd.mean) < 0.01)
         assert(abs(1.0 - rdd.variance) < 0.01)
         assert(abs(1.0 - rdd.stdev) < 0.01)
    +    assert(abs(rdd.variance - rdd.popVariance) < 0.01)
    --- End diff --
    
    Same here, should be exactly equal


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #60496 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60496/consoleFull)** for PR 13403 at commit [`a3baf4f`](https://github.com/apache/spark/commit/a3baf4fc56ad0e1e8a93f6fa20817075e5d9627f).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #61018 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/61018/consoleFull)** for PR 13403 at commit [`a98633b`](https://github.com/apache/spark/commit/a98633ba1042049ea97bbc1f5f2e78f6156554c9).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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


[GitHub] spark pull request: [SPARK-15660][CORE] RDD and Dataset should sho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/13403#issuecomment-222610154
  
    Merged build finished. Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Merged build finished. Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #60771 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60771/consoleFull)** for PR 13403 at commit [`15938b3`](https://github.com/apache/spark/commit/15938b38e1a76be2dd4f749e72084568af9c9600).


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Merged build finished. Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Merged build finished. Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/60715/
    Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/60946/
    Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Merged build finished. Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #61018 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/61018/consoleFull)** for PR 13403 at commit [`a98633b`](https://github.com/apache/spark/commit/a98633ba1042049ea97bbc1f5f2e78f6156554c9).


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/13403


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/60950/
    Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Merged build finished. Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/61018/
    Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #60950 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60950/consoleFull)** for PR 13403 at commit [`3a6396e`](https://github.com/apache/spark/commit/3a6396e8a475fd31245f03050565f1e9c60da986).


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Thank you, @srowen .


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r67922274
  
    --- Diff: core/src/test/java/org/apache/spark/JavaAPISuite.java ---
    @@ -733,8 +733,10 @@ public Boolean call(Double x) {
         assertEquals(20/6.0, rdd.mean(), 0.01);
         assertEquals(20/6.0, rdd.mean(), 0.01);
         assertEquals(6.22222, rdd.variance(), 0.01);
    +    assertEquals(rdd.variance(), rdd.popVariance());
         assertEquals(7.46667, rdd.sampleVariance(), 0.01);
         assertEquals(2.49444, rdd.stdev(), 0.01);
    +    assertEquals(rdd.stdev(), rdd.popStdev(), 0.01);
    --- End diff --
    
    This still asserts approximate equality, when it should be exactly equal


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #60938 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60938/consoleFull)** for PR 13403 at commit [`4f0fc8a`](https://github.com/apache/spark/commit/4f0fc8af902ebc40693daba9ffd2666763960be5).
     * This patch **fails from timeout after a configured wait of \`250m\`**.
     * This patch merges cleanly.
     * This patch adds no public classes.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #59793 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/59793/consoleFull)** for PR 13403 at commit [`0715f08`](https://github.com/apache/spark/commit/0715f087959140e0429f8af21f50cca0649e37ce).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by mengxr <gi...@git.apache.org>.
Github user mengxr commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    @dongjoon-hyun @srowen I made a comment just before @dongjoon-hyun updated the PR:
    
    ~~~
    I think it should be approximate equality but with a very small tolerance, e.g. 1e-14. Both calls trigger reduce jobs and we don't have guarantees on the ordering or reduce operations, which might lead to small numerical errors. Maybe it doesn't apply to the test case here, but it is still a best practice to not test strict equality of floating-point numbers.
    ~~~


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #60496 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60496/consoleFull)** for PR 13403 at commit [`a3baf4f`](https://github.com/apache/spark/commit/a3baf4fc56ad0e1e8a93f6fa20817075e5d9627f).


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #59793 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/59793/consoleFull)** for PR 13403 at commit [`0715f08`](https://github.com/apache/spark/commit/0715f087959140e0429f8af21f50cca0649e37ce).


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r67922737
  
    --- Diff: core/src/test/java/org/apache/spark/JavaAPISuite.java ---
    @@ -733,8 +733,10 @@ public Boolean call(Double x) {
         assertEquals(20/6.0, rdd.mean(), 0.01);
         assertEquals(20/6.0, rdd.mean(), 0.01);
         assertEquals(6.22222, rdd.variance(), 0.01);
    +    assertEquals(rdd.variance(), rdd.popVariance());
         assertEquals(7.46667, rdd.sampleVariance(), 0.01);
         assertEquals(2.49444, rdd.stdev(), 0.01);
    +    assertEquals(rdd.stdev(), rdd.popStdev(), 0.01);
    --- End diff --
    
    Oops. Sorry, I'll review my code again!


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] RDD and Dataset should show the cons...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #60195 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60195/consoleFull)** for PR 13403 at commit [`f999c8c`](https://github.com/apache/spark/commit/f999c8cf6e962c7fe36d9ef98e8cad4fa25c340e).


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r68185536
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/DoubleRDDFunctions.scala ---
    @@ -74,6 +74,22 @@ class DoubleRDDFunctions(self: RDD[Double]) extends Logging with Serializable {
       }
     
       /**
    +   * Compute the population standard deviation of this RDD's elements.
    +   * @since 2.1.0
    --- End diff --
    
    Ur, by the way, some scala code also use java since annotation.
    - SparkSession.scala, StreamingQuery.scala, StreamingQueryManager.scala
    Is it they designed for Java compatible?


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by mengxr <gi...@git.apache.org>.
Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r67924857
  
    --- Diff: core/src/test/java/org/apache/spark/JavaAPISuite.java ---
    @@ -733,8 +733,10 @@ public Boolean call(Double x) {
         assertEquals(20/6.0, rdd.mean(), 0.01);
         assertEquals(20/6.0, rdd.mean(), 0.01);
         assertEquals(6.22222, rdd.variance(), 0.01);
    +    assertEquals(rdd.variance(), rdd.popVariance());
         assertEquals(7.46667, rdd.sampleVariance(), 0.01);
         assertEquals(2.49444, rdd.stdev(), 0.01);
    +    assertEquals(rdd.stdev(), rdd.popStdev(), 0.01);
    --- End diff --
    
    I think it should be approximate equality but with a very small tolerance, e.g. 1e-14. Both calls trigger reduce jobs and we don't have guarantees on the ordering or reduce operations, which might lead to small numerical errors. Maybe it doesn't apply to the test case here, but it is still a best practice to not test strict equality of floating-point numbers.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Merged build finished. Test PASSed.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    **[Test build #60716 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60716/consoleFull)** for PR 13403 at commit [`602e236`](https://github.com/apache/spark/commit/602e236ee66153ad6247c4c024323a4eb5d009c6).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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


[GitHub] spark issue #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` descript...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/13403
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/60771/
    Test PASSed.


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r67597157
  
    --- Diff: core/src/test/scala/org/apache/spark/PartitioningSuite.scala ---
    @@ -244,6 +244,10 @@ class PartitioningSuite extends SparkFunSuite with SharedSparkContext with Priva
         assert(abs(6.0/2 - rdd.mean) < 0.01)
         assert(abs(1.0 - rdd.variance) < 0.01)
         assert(abs(1.0 - rdd.stdev) < 0.01)
    +    assert(abs(1.0 - rdd.popVariance) < 0.01)
    --- End diff --
    
    Perhaps assert that variance == popVariance instead and likewise for stdev? because really we need them to be identical. Otherwise LGTM


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r67597228
  
    --- Diff: core/src/main/scala/org/apache/spark/util/StatCounter.scala ---
    @@ -125,9 +128,12 @@ class StatCounter(values: TraversableOnce[Double]) extends Serializable {
         }
       }
     
    -  /** Return the standard deviation of the values. */
    +  /** Return the population standard deviation of the values. */
       def stdev: Double = math.sqrt(variance)
    --- End diff --
    
    Sure!


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r68007343
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/DoubleRDDFunctions.scala ---
    @@ -74,6 +74,20 @@ class DoubleRDDFunctions(self: RDD[Double]) extends Logging with Serializable {
       }
     
       /**
    +   * Compute the population standard deviation of this RDD's elements.
    +   */
    +  def popStdev(): Double = self.withScope {
    --- End diff --
    
    Oh, I forgot: these need `@Since` annotations. Hm, I'm not clear whether we should merge this for 2.0.0 now. I wouldn't mind but we have an RC now. It's not super urgent. I might mark this as since 2.1.0.


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r67904001
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/DoubleRDDFunctions.scala ---
    @@ -47,12 +47,12 @@ class DoubleRDDFunctions(self: RDD[Double]) extends Logging with Serializable {
         stats().mean
       }
     
    -  /** Compute the variance of this RDD's elements. */
    +  /** Compute the population variance of this RDD's elements. */
       def variance(): Double = self.withScope {
         stats().variance
       }
     
    -  /** Compute the standard deviation of this RDD's elements. */
    +  /** Compute the population standard deviation of this RDD's elements. */
       def stdev(): Double = self.withScope {
    --- End diff --
    
    Oh, for this, I want to keep the current code for code consistency since all other functions `variance/mean/sampleDev/...` has the same code, `self.withScope { stats().~~~ }`.


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


[GitHub] spark pull request #13403: [SPARK-15660][CORE] Update RDD `variance/stdev` d...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13403#discussion_r68184739
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/DoubleRDDFunctions.scala ---
    @@ -74,6 +74,22 @@ class DoubleRDDFunctions(self: RDD[Double]) extends Logging with Serializable {
       }
     
       /**
    +   * Compute the population standard deviation of this RDD's elements.
    +   * @since 2.1.0
    --- End diff --
    
    Oh, I did a stupid mistake again. Then, the correct form is `@Since("2.1.0")`?


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