By Team Edtoolkits · AI learning
Compare one-neighbour copying with a larger local vote on the same query point.
Use the guide alongside the working tool.
Open k-Nearest Neighbours →Explore the lesson
Watch a circle grow around a new point and count its neighbours.
Drag the point and change k to see the vote change.
Flip the memory card and answer the quick check.
A comparison to try
Place the query near a stray point and compare k equal to one with a larger k. Inspect the highlighted neighbours, their distances and vote counts before moving the query elsewhere.
Read the result
Increasing k changes the neighbourhood that participates, not the underlying examples. A lone nearby point can dominate a one-neighbour prediction, while a broader vote may smooth the boundary and overlook smaller local structure.
A mistake to avoid
The two-dimensional invented map uses unscaled straight-line distance. Real feature units, irrelevant dimensions and class imbalance can change neighbourhoods substantially; the leave-one-out score here is not a universal accuracy estimate.
Teaching model and privacy
A teaching version: thirty made-up points of two kinds on a flat map, with plain straight-line distance. Real data has many more features. Everything runs in your browser.
Ready to apply this workflow?
Try k-Nearest Neighbours →Explore a related workflow
- Choose a course entry point and verify saved progress
Use prior knowledge to select a starting chapter while distinguishing local progress from an account or a qualification.
- AI Tokens: Inspect Pieces, Spaces and Stable Teaching IDs
Compare common words, rare words and numbers without using the playground as an exact provider counter.
- Inspect candidates before continuing text
Compare normalized next-word probabilities with the choices sampled from them.
- Choose complexity using held-out error
Compare training and test curves before calling a detailed fit an improvement.
Found unclear instructions or an unexpected result? Contact Team Edtoolkits.