Explore the K-Nearest Neighbors algorithm with this interactive visualization. Click on the canvas to place test points and see real-time classification.
K-Nearest Neighbors (KNN) classifies new data points based on their similarity to existing data points. It finds the K closest neighbors and assigns the most common class among them. Adjust the K value to see how it affects classification results.
Two clearly separated classes
Click on the canvas to add test points.