Feature Scaling

When there are multiple features, say size of the apartment, number of rooms, etc it may take a long time for the gradient descent to arrive at the global minimum of the cost function.

In such cases, it is recommended to scale all the features (say divide the size by 2000 and the number of rooms by 5), to get all features to the same scale.

Try to get all the features to have values approximately in the range [-1, 1].

Last updated