Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

sklearn standardscaler

from sklearn.preprocessing import StandardScaler
data = [[0, 0], [0, 0], [1, 1], [1, 1]]
scaler = StandardScaler()
print(scaler.mean_)
>>>[0.5 0.5]
print(scaler.transform(data))
>>>[[-1. -1.]
   [-1. -1.]
   [ 1.  1.]
   [ 1.  1.]]
 
PREVIOUS NEXT
Tagged: #sklearn #standardscaler
ADD COMMENT
Topic
Name
6+4 =