Fig. 4From: Shallow and deep learning classifiers in medical image analysisRepresentation of how the k-nearest neighbors algorithm works. Considering the new point to classify (?), the category is assigned based on the five nearest neighbors (k = 5). In this case, three triangles versus one circle versus one rectangleBack to article page