Created
March 24, 2020 14:19
-
-
Save sengstacken/ccc05763ffb643a6a5fe25a72c8a41a0 to your computer and use it in GitHub Desktop.
scale dataframes after train test split
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
# scale data between 0 and 1 | |
scaler = MinMaxScaler(feature_range=(0, 1)) | |
scaler.fit(train_df.values) | |
train_scaled = scaler.transform(train_df.values) | |
val_scaled = scaler.transform(val_df.values) | |
test_scaled = scaler.transform(test_df.values) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment