Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

standardscalar

# standard scalar takes a 2d array of (n_samples, n_features)
# and normalizes the features, so that you end up with mean(X) = 0
# and variance(X) = 1

from sklearn.preprocessing import StandardScaler
sc = StandardScaler()
normalized = sc.fit_transform(ndarray)	# fit the scaler and transform the data in one step
Source by scikit-learn.org #
 
PREVIOUS NEXT
Tagged: #standardscalar
ADD COMMENT
Topic
Name
5+9 =