A k-nearest neighbors model classifies a new point based on the k nearest points in the trained dataset.
In the following you can interactively add 2D data and visualize the KNN classification.
- Clicking on the area adds a data point.
- Choose which type of data point to add with the radio buttons below.
- Clicking while hoding down an alt key removes the point under cursor.
- Hold down a shift key to start dragging the point under cursor.