Skip to content

[MRG] Improve OneHotEncoder documentation (Fixes #12261)#12314

Merged
jnothman merged 1 commit intoscikit-learn:masterfrom
Cheukting:one-hot-enco
Oct 14, 2018
Merged

[MRG] Improve OneHotEncoder documentation (Fixes #12261)#12314
jnothman merged 1 commit intoscikit-learn:masterfrom
Cheukting:one-hot-enco

Conversation

@Cheukting
Copy link
Copy Markdown
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

Parameters
----------
categories : 'auto' or a list of lists/arrays of values.
categories : 'auto' (default) or a list of lists/arrays of values.
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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