Open mathurinm opened 2 years ago
@Badr-MOUFAD can you have a look ? You can start a PR with a script isolating and reproducing the issue (hopefully on a single alpha) on the data from the test
@mathurinm, we get the warning only if gap <= tol
.
By playing with alpha
and tol
, I was able to reproduce the warning
celer/tests/test_logreg.py::test_reproduce_error[False]
c:\users\hp\desktop\celer-repo\celer\celer\homotopy.py:313: ConvergenceWarning:
Objective did not converge: duality gap: 1.1778627197155299e-08, tolerance: 2.0794415416798358e-15. Increasing `tol` may make the solver faster without affecting the results much.
Fitting data with very small alpha causes precision issues.
However, I could not find a case where the duality gap is greater than 1, as in your example.
NB: note that I reproduced the warning by using unrealistic values of alpha
and tol
(alpha = 1e-10
and tol = 1e-16
)
Did you take the same data and the same alpha as in the test ?
@mathurinm, I literally reused the code in celer/tests/test_LogisticRegression
.
When you run the tests, you don't have the warnings ? Did you push the code you run somewhere ?
Le ven. 1 avr. 2022 à 12:29, Badr MOUFAD @.***> a écrit :
@mathurinm https://github.com/mathurinm, I literally reused the code in celer/tests/test_LogisticRegression.
— Reply to this email directly, view it on GitHub https://github.com/mathurinm/celer/issues/215#issuecomment-1085729490, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACETTQTUZDQ377VOHSPZOVTVC26XTANCNFSM5JYU7MKA . You are receiving this because you were mentioned.Message ID: @.***>
I do get the warning. I was just testing things locally. so I didn't push any line of code.
@mathurinm,
We get the warning when we run check_estimator
(the utils from sklearn
).
I do know that it checks whether the estimator, in our case LogisticRegression
, abides by the rules of sklearn
.
Yet, I totally ignore what kinds of checks it does. So, I don't know which data causes the warning.
I pushed the code in this branch https://github.com/Badr-MOUFAD/celer/tree/conv-warning-issue
I have only commented the check_estimator
lines in tests/test_logreg
.
To reproduce just run pytest .\celer\tests\test_logreg.py
Running pytest: