Information design · Poster · Politecnico di Milano · 2022 — 23
K-Nearest Neighbors.
How a machine classifies the unknown, explained as a video game.

01Overview
Explain an algorithm to anyone.
In the first month of the Final Synthesis Design Studio, each team took one popular data analysis algorithm and made a poster explaining how it works, with its strengths and weaknesses. Ours was K-Nearest Neighbors: it predicts the category of something new from the K known items closest to it.
- Role
- Information design and illustration, in a team of seven
- Course
- Final Synthesis Design Studio, Sect. C3 · MSc Communication Design · Politecnico di Milano · 2022/23
- Series
- Visual explanations of statistical methods, DensityDesign Lab
- Team
- Andrea Benedetto, Simone Cerea, Camilla Guerci, Surabhi Gupta, Haleh Nobar, Alessandro Pedriali, Yousef Taffal
02The idea
You are in the control tower.
Instead of starting with formulas, the poster starts with a job. “Hi recruit IX 209, welcome to the Main Control Tower!” Unidentified ships appear on the radar, and you have to decide whether each one is an enemy or an ally, by looking at the known ships around it. Every concept of the algorithm becomes a step of that mission.

03Three steps
Set, measure, vote.
The training set of known enemies and allies sits on a map. Step 1 sets the parameters: K and the distance formula. Step 2 measures the distance from the unknown ship to every known one. Step 3 sorts them, takes the K closest, and lets the most frequent class decide.

04Finding the best K
Not too tight, not too loose.
There is no shortcut to the right K. The poster walks through the test-train method, then shows what happens when K is wrong: too small and the boundary hugs every ship (overfitting); too large and it ignores them (underfitting). The ideal balance sits in between.


05Before you go
Features, distances, and a warning.
The poster ends with what a recruit needs next: adding features to handle complex cases, choosing between distance formulas like Manhattan, Minkowski and Hamming, and a reminder that more features also mean more risk of errors.
