k-Nearest Neighbors Visualizer

Visualizing local decision boundaries in $\mathbb{R}^2$
Class A Class B Class C
The Voting Mechanism: $$ \hat{y}(x) = \text{mode}\{y_i \mid x_i \in N_k(x)\} $$ Where $N_k(x)$ is the neighborhood of $k$ closest samples.
Changing $k$ alters the Voronoi-like tessellation. A low $k$ creates complex, non-linear boundaries that are highly sensitive to individual outliers.