weight the contribution of the neighbors by their
distance, for instance the inverse square of the instances distance
where
if the query point matches a training instance exactly the
denominator will be 0 so we will just assign the value of that
instance exactly
for real-valued target functions the formula becomes
where is defined as above
note that if all the training instances return the same value,
that value will also be returned by this formula
weighted distance k-nearest neighbor can include all the
instances, only the computation time necessary can be prohibitive -
but then ``Nearest Neighbor'' becomes a
global method (Shepard's method)
Patricia Jean Riddle
Wed Jun 23 13:06:34 NZST 1999