k-nearest neighbors (KNN)

Patrizia Castagno
2 min readNov 12, 2022

One of several (supervised learning) classifier algorithms used in data mining and machine learning is K-Nearest Neighbors, commonly known as KNN. It is a classifier method where the learning is based on “how similar” is a data (a vector) from other.

How does K-NN work?

Suppose we have:

  • a dataset A,
  • a defined distance metric…

--

--

Patrizia Castagno

Physics and Data Science.Eagerly share insights and learn collaboratively in this growth-focused space.LinkedIn:www.linkedin.com/in/patrizia-castagno-diserafino