loading…
A4.3.2 HL · supervised learning
k-nearest neighbours (k-NN) classifies a new point using the classes of its k nearest labelled points. The class with the most votes is chosen. The labelled points are stored for each new prediction. Add points and watch the decision boundary change.
The shading shows the model's predicted class at each position, based on the vote of its k nearest points. The edges between colours show the decision boundary. Click anywhere to add a point.