How does one-hot encoding categorical variables affect distances in KNN?
Role: Machine Learning Engineer
Category: Machine Learning
Difficulty: medium
Interview Round: Other
Overview: Asks how one-hot encoding categorical features changes Euclidean distances in k-nearest neighbors. Tests whether you can work out the cost of a category mismatch, compare it with scaled numeric features, and handle high-cardinality or mixed-type data.