Q.What is the difference between standardization and normalisation
- MinMaxScaler ( or Normalizer) --> It will shrinks all the values either positive or negative to the range of [0,1] by subtracting each value with the minimum value and dividing with the range. It is implemented as “MinMaxScaler” package in sklearn.
x’=(x-(min(x)) / (max(x)-min(x))
x’ normalized value.
This is called the normalizer in True sense as it takes care of both the positive and negative points (you can try it using positive and negative).
MinMaxScaler – Is the implementations in sklearn.
Note :- There is one normalizer called “Normalizer” in sklearn but that is used only for positive values.(of course you can use this for positive data.) it converts the data into unit norm.
Standardization or ( StandardScaler)
It scales all the data into unit variance by removing the mean from each data points.
1) Calculate the mean (x’) and standard deviations(d) of all the points.
2) Subtract the mean from each points. (x-x’)
2) Divide the results (x-x’)/d.
Here you are rescaling each features so that the distributions of the resulting datas will follow a “normal gaussian distributions” the bell shaped having mean x’=0 and d=1.
StandardScaler – Is the implementations in sklearn.
You can also implement by your own function and do the calculation.
Note :- The above concept is already told in Lecture in crystal clear manner.
KIndly refer this lecture.
All the best!