Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

what does scalar.fit do

from sklearn.preprocessing import StandardScaler
scaler = StandardScaler()
x_train = scaler.fit(x_train) # calc mean & variance of each of the features
x_train = scaler.transform(x_train) # transform features using mean & variance 
x_train = scaler.fit_transform(x_train) # or just do both at once using this
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
8+3 =