GitHub user srowen opened a pull request:
https://github.com/apache/spark/pull/12821
[SPARK-15043] [MLLIB] Fix and re-enable flaky test:
mllib.stat.JavaStatisticsSuite.testCorr
## What changes were proposed in this pull request?
Following https://github.com/apache/spark/pull/12779 this test became
flaky. The issue is that the mean, computed for a covariance calculation, is
now calculated with the standard and slightly more accurate
`MultivariateOnlineSummarizer`. However I think the fact that it uses
`treeAggregate` internally can lead to a different order of summation and very
very slightly different results on different runs.
The immediate fix for the test, which asserts equality, is to use 1
partition. We can find out if that appears to be robust.
More generally, it's an interesting question whether we want
`MultivariateOnlineSummarizer` to be deterministic. I'm not sure if another
aggregation method would provide more guarantees of this, in theory or practice.
## How was this patch tested?
Existing Java stats suite.
(If this patch involves UI changes, please attach a screenshot; otherwise,
remove this)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/srowen/spark SPARK-15043
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/12821.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 #12821
----
commit f755850a0bbcae48118c783a7ca643649deef327
Author: Sean Owen <[email protected]>
Date: 2016-05-01T08:43:13Z
Use 1 partition for simple Java stats test
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]