Skip to content

[MRG+2] change tol in test ridge - #11587

Merged
GaelVaroquaux merged 2 commits into
scikit-learn:masterfrom
sergulaydore:instability_in_test_rigde
Jul 17, 2018
Merged

GaelVaroquaux merged 2 commits into
scikit-learn:masterfrom
sergulaydore:instability_in_test_rigde

Conversation

@sergulaydore

@sergulaydore sergulaydore commented Jul 17, 2018 •

Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Fixes #11200 (Instability in test_ridge.py::test_ridge_sample_weights ). The test was failing for some random states. We observed 26 failures for 100 runs.

What does this implement/fix? Explain your changes.

The problem was that the default tolerance in Ridge was 1e-3 and assert_almost_equal uses a tolerance of 1e-6. Adding tol=1e-6 to Ridge fixes the issue.

Any other comments?

The run time takes approximately 1.3 times of previous.
See more details at #11200 (comment)

@TomDLT TomDLT left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks !

@agramfort agramfort changed the title change tol in test ridge [MRG+2] change tol in test ridge Jul 17, 2018
@GaelVaroquaux

Copy link
Copy Markdown
Member

Something weird is happening in appveyor. Does someone understand?

I think that I'll still merge.

@GaelVaroquaux

Copy link
Copy Markdown
Member

OK, merging!

@GaelVaroquaux
GaelVaroquaux merged commit a496491 into scikit-learn:master Jul 17, 2018
@sergulaydore
sergulaydore deleted the instability_in_test_rigde branch July 18, 2018 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Instability in test_ridge.py::test_ridge_sample_weights

4 participants