What, When and Why Feature Scaling for Machine Learning

Feature Scaling data for Machine Learning Models

Mayank Gupta
TechnoFunnel
Published in
6 min readSep 2, 2020

--

Feature Scaling with Machine Learning. Data Normalization and Standardization of Data. Working with Machine Learning

TechnoFunnel presents the series of article on Machine Learning. In this article we will be talking about the What is feature Scaling and Why do we require Feature Scaling during Machine Learning. We will also discuss about the Normalization and Standardization of Data along with the Implementation of the same using scikit-learn.

What is Feature Scaling ?

Feature Scaling is one of the important pre-processing that is required for standardizing/normalization of the input data. When the range of values are very distinct in each column, we need to scale them to the common level. The values are brought to common level and then we can apply further machine learning algorithm to the input data.

One example for the same could be, that we have different features, in which one of the feature might have data represented in Kilometre, another column might have data represented in Metre and the last column might have data representation in centimetre. Before applying the algorithm to the data, we need to first bring them to the common scale which might be “Metre”, “Kilometre” or “Centimetre” to have effective analysis and prediction.

Input Data before Scaling

Why do we require Normalization and Standardization. Why is Scaling required. Working with Scaling of Data.
Need for Scaling of Data

In the above dataset we can see that the values in column 1 and column 2 are having very different ranges. Column 1 value represents age which lie between 30 to 90 whereas the value of Salary varies between 30,000 to 1,50,000. So the scale of both the column values are very distinct. We need to bring then to the same range before Further Analysis.

Output after Scaling Data

One way to scale the values is to bring the values of all the column between 0 to…

--

--

Mayank Gupta
TechnoFunnel

9 Years of Experience with Front-end Technologies and MEAN Stack. Working on all Major UI Frameworks like React, Angular and Vue https://medium.com/technofunnel