Skip to content

make test_ridge_regression_vstacked_X less sensitive #23152

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

Merged
merged 4 commits into from
Apr 20, 2022

Conversation

MaxwellLZH
Copy link
Contributor

Reference Issues/PRs

This is a fix to issue #23151 .

What does this implement/fix? Explain your changes.

The test error is raised due to the relative difference on a small coefficient, this PR sets atol=1e-3 to avoid such cases.

AssertionError:
Not equal to tolerance rtol=1e-07, atol=0

Mismatched elements: 1 / 3 (33.3%)
Max absolute difference: 7.17563786e-11
Max relative difference: 3.62417193e-06
x: array([-3.677719e+00, -9.925325e-06,  3.448643e+00])
y: array([-3.677719e+00, -9.925289e-06,  3.448643e+00])

@jeremiedbb
Copy link
Member

Related to #23017.

Although I think that setting atol is the thing to do as I commented there, 1e-3 seems way too high to me. We want to keep the rtol=1e-7 check for the coefs that are ~1. I'd rather set atol=1e-8.

@jeremiedbb jeremiedbb added this to the 1.1 milestone Apr 19, 2022
@lorentzenchr lorentzenchr linked an issue Apr 20, 2022 that may be closed by this pull request
@lorentzenchr
Copy link
Member

Related to #23017.

I'd say it's a duplicate of #23017 for solving #23014. #23017 also increases the fitting tolerance for sag and saga as in the other tests.

@ogrisel
Copy link
Member

ogrisel commented Apr 20, 2022

Related to #23168.

test_ridge_regression_unpenalized_vstacked_X
test_ridge_regression_vstacked_X
Copy link
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

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

Thanks @MaxwellLZH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_ridge_regression_vstacked_X is not stable
4 participants