Skip to content
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

API Deprecate average=0 in SGD #28582

Merged
merged 6 commits into from Mar 6, 2024

Conversation

jeremiedbb
Copy link
Member

Fixes #28389

Makes it consistent with the rest of the code base where we require true boolean for boolean parameters.

Based on the param description: "If set to an int greater than 1, averaging will begin once the total number of samples seen reaches average". When not paying enough attention, one might consider that average=0 means start averaging right away, but it's only valid for strictly positive integers. Deprecating average=0 prevents the confusion once and for all.

@jeremiedbb jeremiedbb added API Quick Review For PRs that are quick to review labels Mar 6, 2024
Copy link

github-actions bot commented Mar 6, 2024

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: b2e7dac. Link to the linter CI: here

Copy link
Member

@lesteve lesteve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe mention that average=False should be used (rather than average=0) in the changelog.

Other than this LGTM

@lesteve
Copy link
Member

lesteve commented Mar 6, 2024

BTW I think you don't need [doc quick] in the commit message, since the "quick build" (i.e. make html-noplot) is the default behaviour if there is no change to examples.

@jeremiedbb
Copy link
Member Author

Maybe mention that average=False should be used (rather than average=0) in the changelog.

it's already there :)

Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We can merge if the doc CI does not complain.

@jeremiedbb jeremiedbb enabled auto-merge (squash) March 6, 2024 16:59
@jeremiedbb jeremiedbb merged commit 3347e94 into scikit-learn:main Mar 6, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API module:linear_model Quick Review For PRs that are quick to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apparent mismatch between possible arguments for average in the base stochastic gradient class
3 participants