Visualizing local decision boundaries in $\mathbb{R}^2$
Task Description: k-nearest neighbour algorithm is one of the simplest non-linear machine learning models. In this task, you can check the influence of number of neighbours used to assign the label to the datapoints, and how the decision boundaries change in tesselations. With increasing number of neighbours, the decision boundaries become smoother.
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.