Skip to content
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

If MinMaxScaler().fit_transform(x) doesn't work #5

Open
BenjaminLN opened this issue Feb 28, 2020 · 0 comments
Open

If MinMaxScaler().fit_transform(x) doesn't work #5

BenjaminLN opened this issue Feb 28, 2020 · 0 comments

Comments

@BenjaminLN
Copy link

If your sklearn version is higher than version 0.19(including 0.19),there will be a error that:ValueError: Expected 2D array, got 1D array instead

If your sklearn version is under 0.18,there is a warning that:Passing 1d arrays as data is deprecated in 0.17 and will raise ValueError in 0.19

Solution:
MinMaxScaler(copy=False).fit_transform(x)

https://stackoverflow.com/questions/50546065/scikit-learn-minmax-scaler-doesnt-scale

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

No branches or pull requests

1 participant