Cosine Similarity article on Wikipedia
Can you show the vectors here (in a list or something) and then do the math, and let us see how it works?
I\'m a begin
Using @Bill Bell example, two ways to do this in [R]
a = c(2,1,0,2,0,1,1,1) b = c(2,1,1,1,1,0,1,1) d = (a %*% b) / (sqrt(sum(a^2)) * sqrt(sum(b^2)))
or taking advantage of crossprod() method's performance...
e = crossprod(a, b) / (sqrt(crossprod(a, a)) * sqrt(crossprod(b, b)))