Lecture 3 · Distance metrics

Distance Metrics Lab

The nearest neighbor is not an intrinsic property of the data. It depends on the metric, the feature units, and the importance assigned to each dimension.

AID202 · Fall 20263 geometry examples
1 · Pick a query2 · Change the metric3 · Rescale a feature4 · Switch examples
Prediction: Without moving any data point, can you make a different point become the nearest neighbor only by changing how distance is measured?
Reveal the key idea
Yes. A distance metric encodes which directions and features matter. Scaling one feature changes the geometry of the space, so neighborhoods change even though the raw coordinates stay fixed.