Skip to content

Instantly share code, notes, and snippets.

@lucifermorningstar1305
Created March 29, 2020 11:19
Show Gist options
  • Save lucifermorningstar1305/c09bd5188ae1873fa91f230bd6c5f2c6 to your computer and use it in GitHub Desktop.
Save lucifermorningstar1305/c09bd5188ae1873fa91f230bd6c5f2c6 to your computer and use it in GitHub Desktop.
import numpy as np
from sklearn import preprocessing
features = np.array([[-500, 5],
[2, 10],
[4, 100],
[9, 10]])
# Create the Standard Scaler
standard_scaler = preprocessing.StandardScaler()
# Apply the Standard Rescaling on our feature maps
scaled_feature = standard_scaler.fit_transform(features)
print(scaled_feature)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment