[MRG] DOC Fix warnings in examples#12654
Conversation
rth
left a comment
There was a problem hiding this comment.
Very nice! A few comments are below, overall LGTM.
In general, I don't think it's such a big issue to have e.g. a ConvergenceWarning in an example if a few are remaining. That's a real use case, and it's better to show that to user rather than hide it (just for the sake of having no warnings in sphinx log).
| estimator_dict = { | ||
| 'No stopping criterion': | ||
| linear_model.SGDClassifier(tol=None, n_iter_no_change=3), | ||
| linear_model.SGDClassifier(tol=-np.inf, n_iter_no_change=3), |
There was a problem hiding this comment.
Why not None (or just remove it altogether since it's the default)?
There was a problem hiding this comment.
Had it -inf cause that's the default now, but changed to 1e-3 which is the new default. Not passing it causes a warning.
|
|
||
| t0 = time.clock() | ||
| warnings.filterwarnings("ignore", category=ConvergenceWarning, | ||
| module="sklearn") |
There was a problem hiding this comment.
I would argue that it's better to show the convergence warning to user rather than hide it.
There was a problem hiding this comment.
My idea here is to be explicit in the code that we know the model is not converging, but we know what we're doing. I'd say if such a usecase happens in production, the user should explicitly have this in the code.
|
LGTM, though tests are failing. |
|
yep, the tests fail due to #12906, they used to pass though. |
|
Tests finally pass, [hopefully final] reviews welcome :) |
|
Thanks @adrinjalali |
|
Hmm... this has broken Circle with the following TeX error: Any idea what the cause is, or does it need investigation? |
|
Ah, I see. File name changed. |
|
yep |
|
Fixing in 486f8fc |
Fixe or suppresses many warnings in examples, including matplotlib complaining about the non-gui backend.
Fixe or suppresses many warnings in examples, including matplotlib complaining about the non-gui backend.
This reverts commit 492d014.
This reverts commit 492d014.
Fixe or suppresses many warnings in examples, including matplotlib complaining about the non-gui backend.
Fixe or suppresses many warnings in examples, including matplotlib complaining about the non-gui backend.