Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
What are standarization and normalization? Test with iris data set in Scikit-learn
# 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]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment