K-Nearest Neighbors
A simple, non-parametric machine learning algorithm that classifies a new data point based on the majority class of its 'k' closest neighbors in space.
Think of It Like This
Like figuring out a neighborhood's political leaning by just looking at the yard signs of the five houses closest to you.
KNN is a lazy learning algorithm, meaning it does not build a model during training; instead, it stores the entire dataset and computes distances at inference time. While highly intuitive, it struggles with high-dimensional data (curse of dimensionality) and is computationally expensive for large datasets. It can be used for both classification and regression.