What distance metric is appropriate for binary or categorical feature vectors in KNN?
Role: Machine Learning Engineer
Category: Machine Learning
Difficulty: medium
Interview Round: Other
Overview: Choose a distance metric for k-nearest neighbors when the features are binary or categorical. Tests whether Euclidean distance on label codes is meaningful, how shared zeros should count toward similarity, how one-hot encoding changes distances, and how to handle mixed feature types.