What numerical safeguard is needed for inverse-distance weights when a training point exactly matches the query?
Role: Machine Learning Engineer
Category: Machine Learning
Difficulty: medium
Interview Round: Other
Overview: Asks how to keep inverse-distance weights in k-nearest neighbors well defined when a training point sits exactly at the query. Tests numerical reasoning about division by zero, floating-point distances, ties between duplicate points, and how weighted predictions behave near training data.