Nextdoor: Some Finer Points about KNN
The KNN classifier is one of the most intuitive ML algorithms. It predicts class by polling k nearest neighbors. Because it seems so simple, it is easy to miss a couple of the finer points:
1. Sample Splitting: Traditionally, when we split the sample, there is no peeking across samples.