◆ THE BLUEPRINT
What You're Looking At
KNN regression on 391 real cars. To predict the selected car's mpg, find the K closest cars in (horsepower, weight) and average their mpg.
The Prediction Rule
Distance, Two Ways
Raw units:
Weight spans thousands of lbs and horsepower spans tens, so the weight gap dominates every distance and raw distance behaves like a weight-only model.
Normalized: rescale each variable to \(z = (x - \bar{x})/s\) first, so both count in standard deviations.
The Shaded Region
Everything inside the boundary lies closer to the selected car than the K-th neighbor. In raw units a large horsepower gap barely changes the distance, so the region is a flat slab. Normalized, it is round.
Try This
Select the 48-hp VW Dasher diesel. Raw distance matches it with 75–85 hp gasoline compacts (25.8 mpg predicted); normalized distance finds the other Volkswagens (37.1). Its actual economy: 43.4 mpg.