Skip to main content
. 2019 Dec 21;19:281. doi: 10.1186/s12911-019-1004-8

Fig. 6.

Fig. 6

A simplified illustration of the K-nearest neighbour algorithm. When K = 3, the sample object (‘star’) is classified as ‘black’ since it gets more ‘vote’ from the ‘black’ class. However, for K = 5 the same sample object is classified as ‘red’ since it now gets more ‘vote’ from the ‘red’ class