You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> 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])
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)
Activity
adrinjalali commentedon Jun 30, 2019
This also fails on my system with
scipy==1.3.0glemaitre commentedon Jul 1, 2019
We are having a hard time with tolerance issues when:
Any idea of how we could handle these cases better?
thomasjpfan commentedon Jul 2, 2019
We can use
atolfor comparing float32 and float64.Each algorithm has a different notion of
tol. For this case, we may need to set a differenttolfor each algorithm. (Reminds me ofLogisticRegressiondiscussion)