What is Feature Scaling?
Standardizing
Normalizing
When Should I Use Feature Scaling?
In many machine learning algorithms, the result will change depending on the units of your data. This is especially true in two specific cases:
- When your algorithm uses a distance based metric to predict.
- When you incorporate regularization.
Distance Based Metrics
One common supervised learning technique that is based on the distance points are called Support Vector Machines (or SVMs). Another technique that involves distance based methods to determine a prediction is k-nearest neighbors (or KNN). With either of these techniques, choosing not to scale your data may lead to drastically different (and likely misleading) ending predictions.
For this reason, choosing some sort of feature scaling is necessary with these distance based techniques.
Now previously i talked about regularization! So what is it?
Regularization
When you start introducing regularization, you will again want to scale the features of your model. The penalty on particular coefficients in regularized linear regression techniques depends largely on the scale associated with the features. When one feature is on a small range, say from 0 to 10, and another is on a large range, say from 0 to 1 000 000, applying regularization is going to unfairly punish the feature with the small range. Features with small ranges need to have larger coefficients compared to features with large ranges in order to have the same effect on the outcome of the data. (Think about how for two numbers and .) Therefore, if regularization could remove one of those two features with the same net increase in error, it would rather remove the small-ranged feature with the large coefficient, since that would reduce the regularization term the most.
Again, this means you will want to scale features any time you are applying regularization.
Another point of discussion in the above article is the fact that feature scaling can also speed up convergence of your machine learning algorithms, which you may have to think about as you scale machine learning applications.
Linkedin: Vaibhav Saini
Well Done!!!!
ReplyDeleteWonderful 👍
ReplyDeleteWell explained 👌🏻
ReplyDelete