Skip to content

fix default value for class LinearSVC #16077

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

Closed
wants to merge 1 commit into from
Closed

fix default value for class LinearSVC #16077

wants to merge 1 commit into from

Conversation

junzhaous
Copy link

Reference Issues/PRs

Fix documentation of default values in all classes good first issue help wanted
#15761

What does this implement/fix? Explain your changes.

This is my first contribution. I removed some optional key words and standardized default value as default=. Also I set the default value of class weight to 1 as the specification.

All above changes are made for class LinearSVC

Any other comments?

@junzhaous junzhaous closed this Jan 9, 2020
@junzhaous
Copy link
Author

sorry, mistakenly closed the pull request. reopen it again

@junzhaous junzhaous reopened this Jan 9, 2020
Copy link
Member

@thomasjpfan thomasjpfan left a 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 PR @junzhaous !

@@ -26,28 +26,28 @@ class LinearSVC(BaseEstimator, LinearClassifierMixin,

Parameters
----------
penalty : str, 'l1' or 'l2' (default='l2')
penalty : str, 'l1' or 'l2' default='l2'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
penalty : str, 'l1' or 'l2' default='l2'
penalty : {'l1', 'l2'}, default='l2'

Specifies the norm used in the penalization. The 'l2'
penalty is the standard used in SVC. The 'l1' leads to ``coef_``
vectors that are sparse.

loss : str, 'hinge' or 'squared_hinge' (default='squared_hinge')
loss : str, 'hinge' or 'squared_hinge', default='squared_hinge'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
loss : str, 'hinge' or 'squared_hinge', default='squared_hinge'
loss : {'hinge', 'squared_hinge'}, default='squared_hinge'

Regularization parameter. The strength of the regularization is
inversely proportional to C. Must be strictly positive.

multi_class : str, 'ovr' or 'crammer_singer' (default='ovr')
multi_class : str, 'ovr' or 'crammer_singer',default='ovr'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
multi_class : str, 'ovr' or 'crammer_singer',default='ovr'
multi_class : {'ovr' or 'crammer_singer'}, default='ovr'

Enable verbose output. Note that this setting takes advantage of a
per-process runtime setting in liblinear that, if enabled, may not work
properly in a multithreaded context.

random_state : int, RandomState instance or None, optional (default=None)
random_state : int, RandomState instance or None, default=None
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
random_state : int, RandomState instance or None, default=None
random_state : int, RandomState instance, default=None

@glemaitre
Copy link
Member

Already addressed in #16060 which was opened earlier. Closing this PR.
@junzhaous feel free to pick up another class.

@glemaitre glemaitre closed this Jan 9, 2020
@junzhaous junzhaous deleted the jun-doc-default-fix branch January 9, 2020 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants