Что делает Scalar.fit
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
Trained Tuna