Created
April 21, 2020 15:33
-
-
Save Mehdi-Amine/4cc3780057f37b63b4218863a514241c to your computer and use it in GitHub Desktop.
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
from sklearn.preprocessing import MinMaxScaler | |
norm_scaler = MinMaxScaler() | |
dx_train_normalized_sklearn = norm_scaler.fit_transform(dx_train) | |
# Printing the first 5 rows | |
print(f"Training data normalized using Scikit-Learn: \n{dx_train_normalized_sklearn[:5]}") | |
''' | |
Out: | |
Training data normalized using Scikit-Learn: | |
[[0.3 0.95] | |
[0.7 0.5 ] | |
[0.35 1. ] | |
[0.3 0.9 ] | |
[0.5 0.5 ]] | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment