Private AI on your own hardwareBook a demo

GLOSSARY · K

What Is K-Nearest Neighbors (KNN)?

DEFINITION

K Nearest Neighbors (KNN) is a supervised machine learning algorithm. It uses the nearest examples of its data set to predict the class or value for the new example. For classification problems it will often predict the most frequent class from the nearest examples. For regression problems it will predict a numerical value from the nearest examples. The number of neighbors used, distance measure and scaling of features will affect the prediction.

Importance of KNN

  • Easy to implement – Intuitive method to perform classification and regression.
  • Can be used for categorical or numerical predictions.
  • Uses local examples to make predictions.
  • Low training required – Usually examples are stored during training.
  • Flexible – Can be used for various data sets if appropriate distance measures are chosen.

Use Cases

  • Classify documents and customer feedback.
  • Recommendation of similar products.
  • Find patterns in customer buying behavior.
  • Discover potential outliers.
  • Predict numerical values from similar past observations.

See it running on your own hardware

Vanik Edge OS runs AI models, agents and apps inside your building, so your data stays there.

Book a demo