The same rows can produce a different exact squared-distance comparison after preprocessing.

highlighted = computed this step

Before scaling, the large feature dominates

Raw Q-to-A squared distance is 8101. Raw Q-to-B squared distance is 116, so B is nearer in the raw coordinates.

d2(Q,A)=8101,d2(Q,B)=116d^{2}(Q,A) = 8101,\quad d^{2}(Q,B) = 116
Distance Before and After ScalingExact squared distances from the same displayed rows.squared distance before and after scalingviewcandidate|dx||dy|d^2rawA1908101rawB410116scaledA1/49/10349/400scaledB11/10101/100raw nearest is B; scaled nearest is Apreprocessing changes coordinate scale onlydistance and gradient-style methods see the changed coordinatesNOT training; NOT learning; NOT generalizationNOT accuracy; NOT calibration; NOT a guarantee of model qualityNOT probability truth

After scaling, compare exact fractions

Scaled Q-to-A squared distance is 349/400. Scaled Q-to-B squared distance is 101/100.

d2(Q,A)=349/400,d2(Q,B)=101/100d^{2}(Q,A) = 349/400,\quad d^{2}(Q,B) = 101/100
Distance Before and After ScalingExact squared distances from the same displayed rows.squared distance before and after scalingviewcandidate|dx||dy|d^2rawA1908101rawB410116scaledA1/49/10349/400scaledB11/10101/100raw nearest is B; scaled nearest is Apreprocessing changes coordinate scale onlydistance and gradient-style methods see the changed coordinatesNOT training; NOT learning; NOT generalizationNOT accuracy; NOT calibration; NOT a guarantee of model qualityNOT probability truth

The coordinate scale changed the distance comparison

The same rows give B as the raw nearest and A as the scaled nearest. This is exact distance arithmetic, not a promise about a model.

349/400<101/100349/400 < 101/100
Distance Before and After ScalingExact squared distances from the same displayed rows.squared distance before and after scalingviewcandidate|dx||dy|d^2rawA1908101rawB410116scaledA1/49/10349/400scaledB11/10101/100raw nearest is B; scaled nearest is Apreprocessing changes coordinate scale onlydistance and gradient-style methods see the changed coordinatesNOT training; NOT learning; NOT generalizationNOT accuracy; NOT calibration; NOT a guarantee of model qualityNOT probability truth