Nearest neighbor methods for classification
and regression
• Nearest neighbors is usually used for
classification or regression:
• For regression, average the predictions of the K
nearest neighbors.
– How should we pick K?
• For classification, pick the class with the most
• How should we break ties?
• Let the k’th nearest neighbor contribute a count
that falls off with k. For example,