Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Merged
merged 1 commit into from
Oct 14, 2018

Conversation

Cheukting
Copy link
Contributor

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

@@ -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.
Copy link
Contributor

@eamanu eamanu Oct 6, 2018

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'

Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

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

I use (default)...

Categories (unique values) per feature:

- 'auto' : Determine categories automatically from the training data.
- 'auto' (default): Determine categories automatically from the
Copy link
Contributor

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.

Copy link
Member

@jnothman jnothman left a comment

Choose a reason for hiding this comment

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

Shrug. Okay, thanks

@jnothman jnothman merged commit f5ef674 into scikit-learn:master Oct 14, 2018
jnothman pushed a commit to jnothman/scikit-learn that referenced this pull request Oct 15, 2018
anuragkapale pushed a commit to anuragkapale/scikit-learn that referenced this pull request Oct 23, 2018
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
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.

OneHotEncoder does not document default value categorical_features=None
4 participants