Lecture 17 - KNN
Lecture 17 - KNN
X X X
Rule of thumb:
K = sqrt(N)
N: number of training points X
Distance Metrics
Distance Measure: Scale Effects
Properties:
1) All possible points
within a sample's
Voronoi cell are the
nearest neighboring
points for that sample
2) For any sample, the
nearest sample is
determined by the
closest Voronoi cell
edge
Distance-weighted k-NN
k
Replace
fˆ (q) = arg max å d (v, f ( xi ))
vÎV i =1
k
fˆ (q) = argmax å
1
d (v, f (x i ))
d( x i, x q )
2
v ÎV i=1