1
$\begingroup$

I came across a dataset which scaled the data and gave mean, closer to zero, not exactly zero. Any insights how does scaling work ? I read that it gives mean zero and variance 1.

I tried using sklearn.preprocessing.scale and sklearn.preprocessing.MinMaxScaler

$\endgroup$
1
$\begingroup$

It depends on how it’s normalized. If it’s just a linear transform that maps the minimum value to -1 and the maximum value to 1 (like MinMaxScaler does), then the mean is not necessarily going to be zero.

But that’s not common in machine learning. It’s more common to normalize by standardization, which explicitly shifts the data to have mean 0 and variance 1.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.