The finale separates exact neighbor mechanics from broader modeling choices. It keeps the table and finite region map visible while stating the boundary.

highlighted = computed this step

What is exact

The distances, neighbor order, and majority vote are exact for the shown training set. The query (1, 1) receives class A.

query (1,1)A\text{query }(1, 1)\mapsto A
Exact neighbor mechanicsThe table and lattice use the same displayed training set and k.Exact k-NN votequery=(1,1), k=3, vote=Ai(x,y)classd^2nearesttie-break0(0,0)A21low i1(2,0)A22low i2(0,2)A23low i3(3,3)B8low i4(3,1)B4low i5(1,3)B4low idistances use d^2 only; equal d^2 sorts by lowest training indexExact finite k-NN latticeAAABBBfinite integer lattice: x=0..3, y=0..3

What this surface stops at

The finite region map is a checked grid of integer points. A different k or a denser grid would need its own displayed recomputation.

finite grid, exact vote\text{finite grid, exact vote}
Exact neighbor mechanicsThe table and lattice use the same displayed training set and k.Exact k-NN votequery=(1,1), k=3, vote=Ai(x,y)classd^2nearesttie-break0(0,0)A21low i1(2,0)A22low i2(0,2)A23low i3(3,3)B8low i4(3,1)B4low i5(1,3)B4low idistances use d^2 only; equal d^2 sorts by lowest training indexExact finite k-NN latticeAAABBBfinite integer lattice: x=0..3, y=0..3

Summary

This is not accuracy, not a choice-of-k rule, and no claim of generalization; it pins nearest-neighbor mechanics on toy data.

toy-data nearest-neighbor mechanics only\text{toy-data nearest-neighbor mechanics only}
Exact neighbor mechanicsThe table and lattice use the same displayed training set and k.Exact k-NN votequery=(1,1), k=3, vote=Ai(x,y)classd^2nearesttie-break0(0,0)A21low i1(2,0)A22low i2(0,2)A23low i3(3,3)B8low i4(3,1)B4low i5(1,3)B4low idistances use d^2 only; equal d^2 sorts by lowest training indexExact finite k-NN latticeAAABBBfinite integer lattice: x=0..3, y=0..3