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 StandardScaler for iris data set, this is z-score normalization | |
from sklearn.preprocessing import StandardScaler | |
df_s = df.copy() | |
std_scaler = StandardScaler() | |
df_s.iloc[:, [0, 1, 2, 3]] = std_scaler.fit_transform(df_s.iloc[:, [0, 1, 2, 3]]) | |
df_s.head() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment