Feature Scaling in Machine Learning: Understanding Normalization and Standardization.

What, When and Why of Feature Scaling?

Feature scaling is a data transformation method we use for making the scales of different features irrelevant to the importance assigned to that feature. When we work on datasets where the scales of features are varying than we use feature scaling.

Min Max Normalisation:

The Normalisation method of feature scaling is based on the use of Minimum and Maximum values in the feature. Let’s say we want to normalise a feature, how do I go about it. The new normalised value for each element in the feature is given by below formula:

  • where x’ is the normalised value and x is the original value.
  • All x’ values lie between 0 and 1.

Standardisation (Z-Score Normalisation):

Standardisation is way of feature scaling that can avoid outlier issue (it does not remove outliers for that there are other techniques such as clipping). Standardisation is done by below formula:

  • x’ is the standardised value and s is the original unstandardized value.
  • x bar is mean and sigma is standard deviation of the original feature.
  • Mean of the new standardized feature is zero and standard deviation is 1.
  • The values are not restricted to a particular range.

Normalisation vs standardisation:

There is no specific rule defining when to use which technique.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sandeep Gurjar

Sandeep Gurjar

Just Another Curious Soul Trying Find The Way : Data Science, Machine learning and Artificial Intelligence