Definition
Also known as memory-based learning, this technique does not build a generalized model during training. Instead, it stores the entire training dataset. When a prediction is needed, it finds the most similar instances (neighbors) in the stored data and uses their labels to determine the output. K-Nearest Neighbors (KNN) is the most common algorithm in this category.
Summary
A lazy learning approach where predictions are made by comparing new inputs to stored training instances.
Key Concepts
- Lazy learning
- Similarity metric
- K-Nearest Neighbors
- Memory-based
Use Cases
- Recommendation systems
- Pattern recognition
- Small to medium datasets
Code Example
| |