What Does Scalar Fit Do

[Solved] What Does Scalar Fit Do | Scala - Code Explorer | yomemimo.com
Question : what does scalar.fit do

Answered by : trained-tuna

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

Source : | Last Update : Tue, 17 May 22

Answers related to what does scalar fit do

Code Explorer Popular Question For Scala