Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Missing import to sklearn.preprocessing
import pandas as pd import numpy as np bins = [0, 1, 13, 20, 60, np.inf] labels = ['infant', 'kid', 'teen', 'adult', 'senior citizen'] transformer = preprocessing.FunctionTransformer( pd.cut, kw_args={'bins': bins, 'labels': labels, 'retbins': False} ) X = np.array([0.2, 2, 15, 25, 97]) transformer.fit_transform(X)
import pandas as pd import numpy as np from sklearn import preprocessing bins = [0, 1, 13, 20, 60, np.inf] labels = ['infant', 'kid', 'teen', 'adult', 'senior citizen'] transformer = preprocessing.FunctionTransformer( pd.cut, kw_args={'bins': bins, 'labels': labels, 'retbins': False} ) X = np.array([0.2, 2, 15, 25, 97]) transformer.fit_transform(X)
The text was updated successfully, but these errors were encountered:
Missing import at documentation preprocessing.rst closes scikit-learn…
576ce06
…#28381
Missing import at documentation preprocessing.rst closes #28381 (#28382)
63170d0
c1200cb
…#28381 (scikit-learn#28382)
0e7f542
98b28bc
b20863b
Successfully merging a pull request may close this issue.
Describe the issue linked to the documentation
Missing import to sklearn.preprocessing
Suggest a potential alternative/fix
The text was updated successfully, but these errors were encountered: