K-Nearest Neighbors Virtual Lab

Understand instance-based learning through interactive visualization

🌟 Learn by Doing

Interactive exploration with challenges

📏

Distance Metrics

Compare Euclidean, Manhattan, and Minkowski

🔢

K-Value Explorer

See how K affects classification

⚖️

Weighted Voting

Distance-weighted vs uniform voting

🖱️

Interactive Classifier

Click to add points and classify

Interactive KNN Classifier - Learn by Doing!

Free Exploration Mode

Click to add training points (red/blue), then click anywhere to classify a new point. Watch how the K nearest neighbors vote!

Left-click: Add/change class | Right-click: Delete | Click empty space: Classify

Points: 0
Left-click: Add/Change class
Right-click: Delete point
3

Current K: 3

Distance Metric

Statistics

Training points: 0

Class 0 (Red): 0

Class 1 (Blue): 0

Classifications made: 0