-
-
Notifications
You must be signed in to change notification settings - Fork 26k
DOC adding valid intervals for SGDClassifier class parameters #22115
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 for the PR. Please find my comments below:
Co-authored-by: Olivier Grisel <[email protected]>
Co-authored-by: Olivier Grisel <[email protected]>
Reminder: update glossary as well Co-authored-by: Olivier Grisel <[email protected]>
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.
LGTM!
Since the PR is tagged as WIP, @reshamas did you have any other changes in mind or we can merge this PR as-is? |
Looks like I ought to probably add ranges for these numerical parameters, right?
|
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.
LGTM!
@@ -1037,10 +1037,11 @@ class SGDClassifier(BaseSGDClassifier): | |||
|
|||
power_t : float, default=0.5 | |||
The exponent for inverse scaling learning rate [default 0.5]. | |||
Values should be in the range `(-inf, inf)`. |
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.
I do not anticipate negative power_t
to be mathematically meaningful but apparently our code accepts it without crashing... So ok with documenting it.
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.
I feel like this a case where documenting -inf
will lead to more people trying out. If this is not mathematically meaningful, then we could be promoting a bad practice?
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.
I tested the code in the Binder notebook.
We can open up an issue to address this. Or, is this something that can be set up with tests in the next step, which will be adding check_scalar
functions?
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.
Opened issue #22178
Co-authored-by: Olivier Grisel <[email protected]>
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.
Otherwise LGTM. We can look at the problem of negative power_t
in a dedicate issue.
Reminder to self: |
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.
Thank you for the PRs, @reshamas.
I think, it is more appropriate to use must
over should
here.
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.
LGTM!
Reference Issues/PRs
References #21927
What does this implement/fix? Explain your changes.
Add possible interval ranges for various parameters in class
SGDClassifier
Any other comments?
#DataUmbrella #postsprint
Reference
SGDClassifier documentation