-
-
Notifications
You must be signed in to change notification settings - Fork 26.2k
Fix: Possible unnecessary iterations in Newton-CG algorithm #16266
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rushabh-v, LGTM!
I think we can probably accept this without a regression test, since the fix is trivial and I don't see an obvious way to test it.
I would still add an entry in what's new thought mentioning that we will check for inferior or equal instead of strictly inferior. |
I have added the whatsnew |
Co-Authored-By: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-Authored-By: Guillaume Lemaitre <g.lemaitre58@gmail.com>
doc/whats_new/v0.23.rst
Outdated
@@ -197,6 +197,11 @@ Changelog | |||
|
|||
- |Enhancement| improve error message in :func:`utils.validation.column_or_1d`. | |||
:pr:`15926` by :user:`Loïc Estève <lesteve>`. | |||
|
|||
- |Fix| `optimize._newton_cg` will now avoid an unnecessary iteration by checking for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to focus on public API in what's new. This is private. What public API did this affect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It affects LogisticRegression when arg solver=newton-cg
. I am adding it in whatsnew
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done. Tell me if any change is required...
Fixes #16186