 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
|
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
|
|
|
|
votes.
|
|
|
|
|
How
should we break ties?
|
|
|
|
|
Let the
kth nearest neighbor contribute a count
|
|
|
that
falls off with k. For example,
|
|