-
-
Notifications
You must be signed in to change notification settings - Fork 26.6k
FIX an issue with SGD models(SGDRegressor etc.) convergence criteria #31856
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
Merged
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
b280798
FIX use objective instead of loss for convergence in SGD
glemaitre 5164376
remove debug
glemaitre 8c38943
add more info regarding the objective or validation loss
glemaitre 9af0140
BUG: fix termination criterion of SGD, use objective instead of loss
kostayScr af0270b
added tests
kostayScr ff65305
fixed code formatting
kostayScr af9f2c1
Merge branch 'main' into is/30027
kostayScr 611e7cd
fixed code formatting, number 2
kostayScr 10aa131
fixes test, so that SGD converges, by setting tol=None
kostayScr 66e133a
fix doctest for SGDOneClassSVM
kostayScr 3c9032f
fixed L1 norm accumulation in WeightVector
kostayScr 6099adf
fallback to loss for PA1/PA2; respect penalty_type
kostayScr 4aea4a3
remove debug
kostayScr 4ac8494
fix typo
kostayScr 35eb695
added changelog entry
kostayScr 55846bc
Merge branch 'main' into is/30027
kostayScr 36da843
modified changelog
kostayScr 90be844
Merge branch 'is/30027' of https://github.com/kostayScr/scikit-learn …
kostayScr d8c9a44
refactor to remove variable
kostayScr 09085b1
Update doc/whats_new/upcoming_changes/sklearn.linear_model/31856.fix.rst
kostayScr 3584744
Update sklearn/linear_model/_sgd_fast.pyx.tp
kostayScr 260c8d0
update comment about 0.5 coef of L2 reg term due to weight decay
kostayScr d83e0d8
update comment
kostayScr e89cbc6
update test comment
kostayScr c0a25b4
remove unused line from test
kostayScr a4d1b19
update test comments
kostayScr ba17482
FIX WeightVector norm accumulation
kostayScr 1a675a5
update comment
kostayScr 019ebca
update test comment
kostayScr 9627cd1
update comment about nu / 2
kostayScr 9c903af
update changelog
kostayScr 088bfc4
refactor loss addition
kostayScr b8c3771
add comment
kostayScr 2b23223
Update sklearn/linear_model/_sgd_fast.pyx.tp
kostayScr f03c622
rename variable
kostayScr 41b1081
Update changelog
kostayScr d55c5af
fix typo in comment
kostayScr 8e61f02
remove unnecessary test assert message
kostayScr a6a9367
Merge branch 'main' into is/30027
OmarManzoor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
doc/whats_new/upcoming_changes/sklearn.linear_model/31856.fix.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| - Fix the convergence criteria for SGD models, to avoid premature convergence when | ||
| `tol != None`. This primarily impacts :class:`SGDOneClassSVM` but also affects | ||
| :class:`SGDClassifier` and :class:`SGDRegressor`. Before this fix, only the loss | ||
| function without penalty was used as the convergence check, whereas now, the full | ||
| objective with regularization is used. | ||
| By :user:`Guillaume Lemaitre <glemaitre>` and :user:`kostayScr <kostayScr>` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.