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

SGDRegressor gradient clipping #30448

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

john-zhang-uoft
Copy link

Hello! This is my first pull request and I would love any feedback you have.

This pull request implements gradient clipping as a user-facing parameter for SGDRegressor (#30113).

I added a parameter to the SGDRegressor class and added logic to clip the norm of the gradient with respect to weights (according to what was defined in #30113).

I wrote tests that test the correctness of the math and test that when the parameter is default or set to 0 nothing is changed, made sure that tests pass, that the documentation was updated correctly, and added a news fragment.

Copy link

github-actions bot commented Dec 9, 2024

✔️ Linting Passed

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant