Created
March 29, 2020 11:10
-
-
Save lucifermorningstar1305/0c24eec512e4f5941b211529da2734d5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import numpy as np | |
from sklearn import preprocessing | |
features = np.array([[-500, 5], | |
[2, 10], | |
[4, 100], | |
[9, 10]]) | |
# Create the MinMax Scaler | |
minmax_scaler = preprocessing.MinMaxScaler(feature_range=(0,1)) | |
# Apply the MinMax Rescaling on our feature maps | |
scaled_feature = minmax_scaler.fit_transform(features) | |
print(scaled_features) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment