← All tools
EDTOOLKITS GUIDES

Trace which neighbours determine a classification

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

All practical guides →

Found unclear instructions or an unexpected result? Contact Team Edtoolkits.

YOUR BROWSER, YOUR CHOICE