Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-6720][MLLIB] PySpark MultivariateStatisticalSummary unit test for normL1... #5374

Closed
wants to merge 2 commits into from

Conversation

Lewuathe
Copy link
Contributor

@Lewuathe Lewuathe commented Apr 6, 2015

... and normL2.
Add test cases to insufficient unit test for normL1 and normL2.

Ref: #5359

@Lewuathe Lewuathe changed the title [SPARK-6720] PySpark MultivariateStatisticalSummary unit test for normL1... [SPARK-6720][MLLIB] PySpark MultivariateStatisticalSummary unit test for normL1... Apr 6, 2015
@SparkQA
Copy link

SparkQA commented Apr 6, 2015

Test build #29740 has started for PR 5374 at commit dc5718c.

@SparkQA
Copy link

SparkQA commented Apr 6, 2015

Test build #29740 has finished for PR 5374 at commit dc5718c.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.
  • This patch does not change any dependencies.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/29740/
Test PASSed.

summary2 = Statistics.colStats(data2)
self.assertEqual(array([45.0]), summary2.normL1())
# Confirm normL2 is among this span because it is a float value.
self.assertTrue(summary2.normL2()[0] > 16.5)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bounds are too loose. We should reach machine precision for this.

import math
expectedNormL2 = math.sqrt(sum(map(lambda x: x*x, xrange(10))))
self.assertTrue(math.abs(summary2.normL2()[0] - expectedNormL2) < 1e-14)

@SparkQA
Copy link

SparkQA commented Apr 7, 2015

Test build #29791 has started for PR 5374 at commit 5541b24.

@SparkQA
Copy link

SparkQA commented Apr 7, 2015

Test build #29791 has finished for PR 5374 at commit 5541b24.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.
  • This patch does not change any dependencies.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/29791/
Test PASSed.

@mengxr
Copy link
Contributor

mengxr commented Apr 7, 2015

LGTM. Merged into master. Thanks!

@asfgit asfgit closed this in fc957dc Apr 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants