Slide 4
Slide 4 text
Jaccard similarity
• Jaccard similarity for term vector-based representations:
simJaccard(x, y) = i
1(xi) × 1(yi)
i
1(xi + yi)
,
◦ here 1(x) is an indicator function (1 if x > 0 and 0 otherwise).
Example
term 1 term 2 term 3 term 4 term 5
doc x 1 0 1 0 3
doc y 0 2 4 0 1
Table: Document-term vectors with term frequencies.
x = 1, 0, 1, 0, 3 y = 0, 2, 4, 0, 1
simJaccard
(x, y) =
0 + 0 + 1 + 0 + 1
1 + 1 + 1 + 0 + 1
=
2
4
4 / 10