Skip to content

test_dtype_match[sag] error on scipy-dev #14219

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

Closed
thomasjpfan opened this issue Jun 29, 2019 · 3 comments · Fixed by #14385
Closed

test_dtype_match[sag] error on scipy-dev #14219

thomasjpfan opened this issue Jun 29, 2019 · 3 comments · Fixed by #14385

Comments

@thomasjpfan
Copy link
Member

test_dtype_match[sag] is failing on scipy-dev:

>       assert_allclose(ridge_32.coef_, ridge_64.coef_, rtol=1e-4)
E       AssertionError: 
E       Not equal to tolerance rtol=0.0001, atol=0
E       
E       Mismatch: 20%
E       Max absolute difference: 1.16000745e-05
E       Max relative difference: 0.00021615
E        x: array([-0.033519, -0.288303, -0.15874 ,  0.094331,  0.378421],
E             dtype=float32)
E        y: array([-0.033527, -0.288297, -0.158729,  0.09434 ,  0.378415])
@adrinjalali
Copy link
Member

This also fails on my system with scipy==1.3.0

@glemaitre
Copy link
Member

We are having a hard time with tolerance issues when:

  • comparing results from float32/float64
  • comparing results from exact algorithms vs. iterative (stochastic) method

Any idea of how we could handle these cases better?

@thomasjpfan
Copy link
Member Author

comparing results from float32/float64

We can use atol for comparing float32 and float64.

comparing results from exact algorithms vs. iterative (stochastic) method

Each algorithm has a different notion of tol. For this case, we may need to set a different tol for each algorithm. (Reminds me of LogisticRegression discussion)

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 a pull request may close this issue.

3 participants