K nearest neighbor
LING 572 Advanced Statistical Methods for NLP Shane Steinert-Threlkeld January 16, 2020
1
K nearest neighbor LING 572 Advanced Statistical Methods for NLP - - PowerPoint PPT Presentation
K nearest neighbor LING 572 Advanced Statistical Methods for NLP Shane Steinert-Threlkeld January 16, 2020 1 The term weight in ML Weights of features Weights of instances Weights of classifiers 2 The term binary in ML
LING 572 Advanced Statistical Methods for NLP Shane Steinert-Threlkeld January 16, 2020
1
2
3
4
5
6 img: Antti Ajanki, CC-by-SA 3.0
7
8
9
10
[0,100], income [0, 200K]
x2=(0.36, 0.40), x3 = (0.70, 0.395).
11
12
to zero eliminates this dimension altogether.
13
14
2∥dj∥2 2
be the class label for the i-th neighbor of x. that is, g(c) is the number of neighbors with label c.
15
i
➔ We can use all the training examples.
16
c
c
i
17
IR, fig 14.6
18
link
19
20