next up previous
Next: Correlation-based Similarity Up: Item Similarity Computation Previous: Item Similarity Computation

Cosine-based Similarity

In this case, two items are thought of as two vectors in the m dimensional user-space. The similarity between them is measured by computing the cosine of the angle between these two vectors. Formally, in the $m \times n$ ratings matrix in Figure 2, similarity between items i and j, denoted by sim(i,j) is given by

\begin{displaymath}sim(i,j) = \cos(\vec{i}, \vec{j}) = \frac{\vec{i} \cdot \vec{j}}
{\Vert\vec{i}\Vert _{2} \ast \Vert\vec{j}\Vert _{2}}
\end{displaymath}

where ``$\cdot$'' denotes the dot-product of the two vectors.



Badrul M. Sarwar
2001-02-19