EasyDeepLearn

Why do you scale features before k-means?

easy

Answer

  • Euclidean distance is scale-sensitive: a feature with 1000-range dominates one with 0-1 range.
  • Standardize (z-score) so features contribute equally.
  • Exception: if scale carries meaning (spatial coordinates in meters), don't scale.
  • Also: outliers stretch scale → robust scaling (median / IQR) can be better.
  • Missing this is one of the most common bugs in first-time clustering pipelines.
Check yourself — multiple choice
  • Never scale
  • Distance is scale-sensitive → z-score so features contribute equally; robust scaling for outliers; keep raw scale only if it's meaningful
  • Same as PCA
  • Random

k-means Euclidean is scale-sensitive → standardize features by default.

#clustering#similarity

Practise Unsupervised Learning

214 interview questions in this topic.

Related questions