kNN

How it works

For every unlabeled instance (the ones to be classified):

  1. It measures the distance to every labeled sample.

  2. It sorts the distances incrementally.

  3. It selects the closets k instances.

  4. It assigns the most frequent class on the selected k instances.

Source: DataCamp

Last updated

Was this helpful?