📞 0339-0387701 (WhatsApp) Contact

« Back to Data Science & AI (NCCIA)

Why is feature scaling important before training a distance-based model such as k-nearest neighbours?

A. To increase the number of features in the dataset
B. To remove all categorical features from the data
C. So that features with larger values do not dominate the distance calculation ✅
D. To make the model memorise the training data

Correct Answer: C. So that features with larger values do not dominate the distance calculation

Explanation

Distance-based models compare feature values directly, so an unscaled feature with a large range would outweigh the others; scaling puts features on a comparable footing.