Home▸Machine Learning & Neural Networks▸k-NN Classifier (2D)

k-NN Classifier (2D)

Interactive 2D k-nearest-neighbours classifier. Click to add labelled training points in three classes, tune k, and watch the majority-vote decision regions update live over a colour-coded grid.

Machine Learning & Neural Networks2DEasy60 FPS📱 Mobile-adapted⇄ 3D version
2d-knn ↗ Open standalone
⚙ Under the hood

A 2D scatter-plot companion to the 3D k-nearest-neighbours simulation: click to label training points in three classes, tune k, and watch the majority-vote decision regions update live over a colour-coded grid.

machine-learningclassificationknnsupervised-learningdecision-boundary

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)