Classify Mystery Items with the K-Nearest Neighbors Algorithm in JavaScript

Share this video with your friends

Send Tweet

The k-nearest neighbors algorithm is used for classification of unknown items and involves calculating the distance of the unknown item's neighbors. We'll use Euclidean distance to determine the closest neighbor and make our best guess on what the mystery fruit is.