Skip to content

Commit

Permalink
unittest pin `atol
Browse files Browse the repository at this point in the history
  • Loading branch information
Badr-MOUFAD committed Mar 31, 2024
1 parent 37845f7 commit bdf1e6d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions skglm/tests/test_estimators.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def test_equivalence_cox_SLOPE_cox_L1(use_efron, issparse):
method = 'efron' if use_efron else 'breslow'
estimator = CoxEstimator(alpha, l1_ratio=1., method=method, tol=1e-9).fit(X, y)

np.testing.assert_allclose(w, estimator.coef_, atol=1e-6)
np.testing.assert_allclose(w, estimator.coef_, atol=1e-5)


@pytest.mark.parametrize("use_efron", [True, False])
Expand Down Expand Up @@ -600,9 +600,8 @@ def test_GroupLasso_estimator_sparse_vs_dense(positive):
glasso.fit(X_sparse, y)
coef_sparse = glasso.coef_

np.testing.assert_allclose(coef_sparse, coef_dense, rtol=1e-6)
np.testing.assert_allclose(coef_sparse, coef_dense, atol=1e-7, rtol=1e-5)


if __name__ == "__main__":
test_GroupLasso_estimator(True, True)
pass

0 comments on commit bdf1e6d

Please sign in to comment.