DOC Ensures that l1_min_c passes numpydoc validation#24134
Merged
jeremiedbb merged 3 commits intoscikit-learn:mainfrom Sep 6, 2022
Merged
DOC Ensures that l1_min_c passes numpydoc validation#24134jeremiedbb merged 3 commits intoscikit-learn:mainfrom
jeremiedbb merged 3 commits intoscikit-learn:mainfrom
Conversation
lucyleeow
reviewed
Aug 7, 2022
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. |
Member
There was a problem hiding this comment.
Thanks @kshitijkapadni , any reason for changing the docstring to be one line? We generally like to keep lines <88 characters
Contributor
Author
There was a problem hiding this comment.
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?
Member
There was a problem hiding this comment.
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
Suggested change
| 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'. |
jeremiedbb
approved these changes
Sep 6, 2022
Member
jeremiedbb
left a comment
There was a problem hiding this comment.
Thanks for the PR @kshitijkapadni. I directly pushed to apply the last review comment. LGTM
glemaitre
pushed a commit
to glemaitre/scikit-learn
that referenced
this pull request
Sep 12, 2022
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
Addresses #21350
What does this implement/fix? Explain your changes.
Any other comments?