Created
January 12, 2020 05:10
-
-
Save kumar-abhishek/2eebe58dd1a3e2cdd3ad584102a259d0 to your computer and use it in GitHub Desktop.
Standardizing the data set
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scaler = MinMaxScaler(feature_range=(0, 1)) | |
dataXScaler = scaler.fit_transform(dataX) | |
dataYScaler = scaler.fit_transform(dataY) | |
print(dataXScaler[0:5]) | |
print(dataYScaler[0:5]) | |
>>> | |
[[0.44444444 0.77777778 1. 0.88235294] | |
[0.44444444 0.77777778 1. 0.88235294] | |
[0.44444444 0.77777778 1. 0.88235294] | |
[0.44444444 0.77777778 1. 0.88235294] | |
[0.55555556 0.77777778 0.41666667 0.70588235]] | |
[[0.44444444 0.77777778 1. 0.88235294] | |
[0.44444444 0.77777778 1. 0.88235294] | |
[0.44444444 0.77777778 1. 0.88235294] | |
[0.55555556 0.77777778 0.41666667 0.70588235] | |
[0.55555556 0.77777778 0.41666667 0.70588235]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment