Can anyone explain me StandardScaler?

nitinvijay23 picture nitinvijay23 · Nov 23, 2016 · Viewed 158.6k times · Source

I am unable to understand the page of the StandardScaler in the documentation of sklearn.

Can anyone explain this to me in simple terms?

Answer

user6903745 picture user6903745 · Nov 23, 2016

The idea behind StandardScaler is that it will transform your data such that its distribution will have a mean value 0 and standard deviation of 1.
In case of multivariate data, this is done feature-wise (in other words independently for each column of the data).
Given the distribution of the data, each value in the dataset will have the mean value subtracted, and then divided by the standard deviation of the whole dataset (or feature in the multivariate case).