Last active
April 21, 2020 16:31
-
-
Save Mehdi-Amine/f19234372b93f1aa486bd79aa2f68eb0 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 StandardScaler | |
std_scaler = StandardScaler() | |
dx_train_standardized_sklearn = std_scaler.fit_transform(dx_train) | |
# Printing the first 5 rows | |
print(f"Training data standardized using Scikit-Learn: \n{dx_train_standardized_sklearn[:5]}") | |
''' | |
Out: | |
Training data standardized using Scikit-Learn: | |
[[-0.55691098 1.55759807] | |
[ 0.80869448 0.06826127] | |
[-0.38621029 1.72307993] | |
[-0.55691098 1.3921162 ] | |
[ 0.12589175 0.06826127]] | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment