Fig. 6
From: Comparing different supervised machine learning algorithms for disease prediction
![Fig. 6](http://media.springernature.com/full/springer-static/image/art%3A10.1186%2Fs12911-019-1004-8/MediaObjects/12911_2019_1004_Fig6_HTML.png)
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