from sklearn import preprocessing
scaler = preprocessing.StandardScaler()
# or scaler = preprocessing.StandardScaler().fit(X_train)
# Using the fit method, StandardScaler estimated the parameters: sample mean and STDEV for each feature dimension
scaler.fit(X_train)
# Return mean
scaler.mean_
# Return scaled sample
scaler.scale_
# standardize the training data using those estimated parameters
X_train_std = scaler.transform(X_train)