-
-
Notifications
You must be signed in to change notification settings - Fork 26.2k
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
Documentation improvement #13904
Conversation
not sure why the build is failing. |
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.
you can ignore the test failures in azure
sklearn/preprocessing/_encoders.py
Outdated
@@ -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'." |
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.
sklearn/preprocessing/_encoders.py:370:80: E501 line too long (92 > 79 characters)
sklearn/preprocessing/_encoders.py
Outdated
@@ -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'." |
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.
There should be no spaces before or after the = in a function definition (see https://lintlyci.github.io/Flake8Rules/rules/E251.html).
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.
LGTM, thanks @rick2047
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.