Skip to content

Documentation improvement #13904

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 5 commits into from
May 20, 2019
Merged

Documentation improvement #13904

merged 5 commits into from
May 20, 2019

Conversation

rick2047
Copy link
Contributor

Reference Issues/PRs

Fixes #13791 and fixes #13881

What does this implement/fix? Explain your changes.

addes new documentation for fbeta_score and correct deprecation warning for OneHotEncoder

Any other comments?

OneHotEncoder behavior using n_values and categories seem a bit inconsistent. For n_values you just need to know the number of categories while for categories you need to know both number of values and number of features you will encode. More details in this comment.

@rick2047
Copy link
Contributor Author

not sure why the build is failing.

Copy link
Member

@qinhanmin2014 qinhanmin2014 left a comment

Choose a reason for hiding this comment

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

you can ignore the test failures in azure

@@ -367,7 +367,7 @@ def _handle_deprecations(self, X):
msg = (
"Passing 'n_values' is deprecated in version 0.20 and will be "
"removed in 0.22. You can use the 'categories' keyword "
"instead. 'n_values=n' corresponds to 'categories=[range(n)]'."
"instead. 'n_values=n' corresponds to 'categories=[range(n)] * n_features'."
Copy link
Member

Choose a reason for hiding this comment

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

sklearn/preprocessing/_encoders.py:370:80: E501 line too long (92 > 79 characters)

@qinhanmin2014 qinhanmin2014 added this to the 0.21.2 milestone May 18, 2019
@@ -367,7 +367,8 @@ def _handle_deprecations(self, X):
msg = (
"Passing 'n_values' is deprecated in version 0.20 and will be "
"removed in 0.22. You can use the 'categories' keyword "
"instead. 'n_values=n' corresponds to 'categories=[range(n)]'."
"instead. 'n_values=n' corresponds to "
"'categories = [range(n)] * n_features'."
Copy link
Member

Choose a reason for hiding this comment

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

There should be no spaces before or after the = in a function definition (see https://lintlyci.github.io/Flake8Rules/rules/E251.html).

Copy link
Member

@qinhanmin2014 qinhanmin2014 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @rick2047

@qinhanmin2014 qinhanmin2014 merged commit ea58e27 into scikit-learn:master May 20, 2019
jnothman pushed a commit to jnothman/scikit-learn that referenced this pull request May 21, 2019
koenvandevelde pushed a commit to koenvandevelde/scikit-learn that referenced this pull request Jul 12, 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.

f_beta_score documentation OneHotEncoder - categories parameter not working as deprecated n_values parameter
2 participants