-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
[MRG] Improve OneHotEncoder documentation (Fixes #12261) #12314
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
sklearn/preprocessing/_encoders.py
Outdated
@@ -145,10 +145,11 @@ class OneHotEncoder(_BaseEncoder): | |||
|
|||
Parameters | |||
---------- | |||
categories : 'auto' or a list of lists/arrays of values. | |||
categories : 'auto' (default) or a list of lists/arrays of values. |
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.
Reading and following other docstrings, I would write:
categories: 'auto' or a list of list/array of values, default='auto'
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 think we like to have default=auto
at the end of the line, unless that makes the line too long.
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 use (default)...
sklearn/preprocessing/_encoders.py
Outdated
Categories (unique values) per feature: | ||
|
||
- 'auto' : Determine categories automatically from the training data. | ||
- 'auto' (default): Determine categories automatically from the |
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 think if you tell above that the 'auto' is default, I don't believe that here is necessary.
daec686
to
035adde
Compare
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.
Shrug. Okay, thanks
This reverts commit 516d81b.
This reverts commit 516d81b.
Reference Issues/PRs
Fixes #12261
What does this implement/fix? Explain your changes.
Improve OneHotEncoder documentation by making default setting clear
Any other comments?
NA