Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# data normalization with sklearn
from sklearn.preprocessing import MinMaxScaler
# fit scaler on training data
norm = MinMaxScaler().fit(X_train)
# transform training data
X_train_norm = norm.transform(X_train)
# transform testing dataabs
X_test_norm = norm.transform(X_test)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment