TL;DRk-Nearest Neighbors classifies a point by the majority vote of its closest neighbors.
kNN is the simplest learner: to classify a new point, find the k closest training points and take their majority label (or average for regression). There's no real "training" — it stores the data and computes distances at prediction time ("lazy" learning). Intuitive and surprisingly effective, but slow at scale and very sensitive to feature scaling and the choice of k.
Key points
Classify by majority of k nearest points
"Lazy" — no training, work at predict time
Intuitive and effective on small data
Slow at scale; scale features; tune k
Common mistakes
Forgetting to scale features (distance dominated by big ranges)
Using it on large datasets (slow predictions)
Bad k (too small = noisy, too big = blurry)
Try it: Explain why feature scaling matters so much for kNN.
Example code
<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>new point → find 5 nearest training points
majority label wins
must scale features; choose k carefully</pre></body></html>