about cosine similarity -


I find cosine similarity between documents. I did this

D1 = ( 8, 0,0,1) where 8,0,0,1 TF, T3, T4, T4, T4, T4, T4, T4, TF-IDF score, D2 = (7, 0,0,1)

cos (thita) = (56 + 0 + 0 + 1) / sqrt (64 + 49) sqrt (1 +1)

Which comes out

Kos (theta) = 5

Now what should I evaluate with this value ... I do not get to know what (theta) = 5 tells about equality between them Is i ...

Everything is wrong.

  D1 · D2 SIM = ----------- | D1 | | D2  

here

  D1 + D2 = (7 * 8 + 0 * 0 + 0 + 1 * 1) = 57 _________________________ D2 = √ 7 ^ 2 + 0 ^ 2 + 0 ^ 2 + 1 ^ 2 = √50 ______________________ __ | D1 | = √ 8 ^ 2 + 0 ^ 2 + 0 ^ 2 + 1 ^ 2 = √65  

should be equality (57 / √ (50 * 65)) = 0.999846142, no 5 .


Comments