Created
November 12, 2020 12:19
-
-
Save yuyasugano/fae48a1a67209d58cbfeda0f2fdab63e to your computer and use it in GitHub Desktop.
What are standarization and normalization? Test with iris data set in Scikit-learn
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
# apply MinMaxScaler for iris data set, [0, 1] for the range | |
from sklearn.preprocessing import MinMaxScaler | |
df_n = df.copy() | |
min_max_scaler = MinMaxScaler() | |
df_n.iloc[:, [0, 1, 2, 3]] = min_max_scaler.fit_transform(df_n.iloc[:, [0, 1, 2, 3]]) | |
df_n.head() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment