The Alchemist.
HomeAI EngineeringSubstack
SubscribeLogin
Series Menu
Active SeriesClick to switch
Progress0 / 81
Feature Engineering
Imbalanced Datasets
Linear Regression
Logistic Regression
Support Vector Machines
Naive Bayes
K Nearest Neighbors
Decision Tree
Ensemble
Unsupervised
  1. Home
  2. Blog
  3. Machine Learning
  4. K Nearest Neighbors
Back to Machine Learning

~/blog/tutorials/machine-learning

K Nearest Neighbors

Tutorial
Jun 26, 202613 min read
0

K-Nearest Neighbors

You're house hunting. You find a 1,250 sq ft, 3-bedroom place — not too big, not too small — and you need to know two things fast: is this in a decent neighborh…

Tutorial
Jun 26, 202613 min read
0

KD-Tree and Ball Tree

You have a million training samples and a query comes in. Brute-force KNN computes the distance from that query to every single one of those million points. At…

Tutorial
Jun 26, 202611 min read
0

KNN Implementation

You know how KNN works by hand and how spatial indexing makes it fast at scale. Now the question is: how do you actually tune it for a real dataset? What $k$ sh…

Mohammed Vasim

Entrepreneur, AI & Machine Learning Engineer

I design, build, and ship real-world digital products—combining AI, full-stack engineering, and product thinking to turn ideas into scalable, production-ready systems.

Navigation

  • Home
  • AI Engineering
  • Projects
  • About
  • Contact

Stay in the loop

New posts on ML, AI engineering, and building things.

© 2026 Mohammed Vasim. Built with curiosity.