- Have labeled “training” data (Supervised Learning
)
- For any image that should be classified, find the nearest neighbor
- for some distance metric
- and use the same labels
Variation: k-nearest neighbors
#
- compute the
nearest neighbors
- and take the majority vote of their labels
- more “rounded” distribution
- can handle outliers
- you can end up with regions without a majority
- Performance on the training data (actally not important metric -> overfitting):
| Method |
Result |
| Nearest neighbor |
perfect result |
| k-nearest neighbors |
maybe wrong results |