Decision surfaces of kNN
This applet shows the decision surfaces created by various configurations of the kNN classifier.

kNN-1: Considers one nearest neighbor.
kNN-ALL: Considers all data points, weighted inversely by their distance.

Use the 'Shuffle' button to generate a new set of instances. You can also use the left or right mouse button to add instances of red or green class, respectively.

Try putting a lot of red dots at the same place, and see the decision boundaries change in kNN-ALL mode.

« Home