Skip to content

Instantly share code, notes, and snippets.

@AyishaR
Created January 16, 2021 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AyishaR/35cf4456908d5cd2ffce73c386c3f325 to your computer and use it in GitHub Desktop.
Save AyishaR/35cf4456908d5cd2ffce73c386c3f325 to your computer and use it in GitHub Desktop.
# Each feature has a different range.
# Using min_max_scaler to scale them to values in the range [0,1].
min_max_scaler = MinMaxScaler()
# Fit on training set alone
Xtrain = min_max_scaler.fit_transform(Xtrain)
# Use it to transform val and test input
Xval = min_max_scaler.transform(Xval)
Xtest = min_max_scaler.transform(Xtest)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment