-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
DOC Ensures that l1_min_c passes numpydoc validation #24134
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
DOC Ensures that l1_min_c passes numpydoc validation #24134
Conversation
sklearn/svm/_bounds.py
Outdated
linear_model.LogisticRegression with penalty='l1'. | ||
|
||
This value is valid if class_weight parameter in fit() is not set. | ||
Return the lowest bound for C such that for C in (l1_min_C, infinity) the model is guaranteed not to be empty. This applies to l1 penalized classifiers, such as LinearSVC with penalty='l1' and linear_model.LogisticRegression with penalty='l1'. This value is valid if class_weight parameter in fit() is not set. |
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 @kshitijkapadni , any reason for changing the docstring to be one line? We generally like to keep lines <88 characters
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 get this SS06: Summary should fit in a single line. If I keep it multiple lines in the docstring validation. Can you guide me on this?
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.
It just means that the short summary should be less than 88 characters.
You can then use a long summary. The following will solve the problem
Return the lowest bound for C such that for C in (l1_min_C, infinity) the model is guaranteed not to be empty. This applies to l1 penalized classifiers, such as LinearSVC with penalty='l1' and linear_model.LogisticRegression with penalty='l1'. This value is valid if class_weight parameter in fit() is not set. | |
Return the lowest bound for C. | |
The lower bound C is computed such that for C in (l1_min_C, infinity) | |
the model is guaranteed not to be empty. This applies to l1 penalized | |
classifiers, such as LinearSVC with penalty='l1' and | |
linear_model.LogisticRegression with penalty='l1'. |
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 @kshitijkapadni. I directly pushed to apply the last review comment. LGTM
Reference Issues/PRs
Addresses #21350
What does this implement/fix? Explain your changes.
Any other comments?