Introduction
Get introduced to K-Nearest Neighbors (KNN), a simple yet powerful algorithm for classification and regression.
Theory
Understand the theory behind KNN, focusing on distance metrics and decision boundaries.
scikit-learn Example
Tune and evaluate a leakage-safe K-nearest-neighbors classifier.
TensorFlow Guidance
Understand why classical KNN belongs in a neighbor-search library rather than a Keras model.
PyTorch Guidance
Understand why KNN is not a native PyTorch estimator and how to choose the right tool.
Common Mistakes & Best Practices
Prevent leakage and choose KNN scaling, distance, validation, and deployment settings correctly.
Comparison with Other Algorithms
Compare KNN with linear models, trees, SVMs, ensembles, and neural networks.