kNN
Last updated
Last updated
Is an instance-based algorithm. So, there is not training step. Classification is directly inferred!
For every unlabeled instance (the ones to be classified):
It measures the distance to every labeled sample.
It sorts the distances incrementally.
It selects the closets k instances.
It assigns the most frequent class on the selected k instances.