FIX SGDRegreesor and SGDClassifier use correct number of validation data#23256
Merged
jeremiedbb merged 8 commits intoscikit-learn:mainfrom May 2, 2022
Merged
Conversation
thomasjpfan
reviewed
May 1, 2022
Member
thomasjpfan
left a comment
There was a problem hiding this comment.
Thank you for the PR!
I think this is a big enough bug to place into 1.1. The behavior on main only uses rows 0 and 1 for validation.
Please add an entry to the change log at doc/whats_new/v1.1.rst with tag |Fix|. Like the other entries there, please reference this pull request with :pr: and credit yourself (and other contributors if applicable) with :user:.
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
thomasjpfan
approved these changes
May 1, 2022
Member
thomasjpfan
left a comment
There was a problem hiding this comment.
Minor comments, otherwise LGTM
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
jeremiedbb
approved these changes
May 2, 2022
Member
jeremiedbb
left a comment
There was a problem hiding this comment.
LGTM. Thanks @MaxwellLZH !
jeremiedbb
added a commit
to jeremiedbb/scikit-learn
that referenced
this pull request
May 10, 2022
…ata (scikit-learn#23256) Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com> Co-authored-by: jeremiedbb <jeremiedbb@yahoo.fr>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reference Issues/PRs
Fixes #23255.
What does this implement/fix? Explain your changes.
validation_maskto be a boolean array for correct indexing.Any other comments?
I haven't added any test cases because I'm not quite sure how to test this behavior without directly using internal api like checking against
_ValidationScoreCallback.X_val.shape.