Vector space model: Difference between revisions

Content deleted Content added
Shorten Short description per WP:SDSHORT
The vector index changes in the expanded sum, the inner product <dj, q> turns into something betweein w[i,j] which is misleading and this is in a description of a non weighted vector
Line 33:
Using the cosine the similarity between document ''d<sub>j</sub>'' and query ''q'' can be calculated as:
 
:<math>\mathrm{cos}(d_j,q) = \frac{\mathbf{d_j} \cdot \mathbf{q}}{\left\| \mathbf{d_j} \right\| \left \| \mathbf{q} \right\|} = \frac{\sum _{i=1}^N w_d_{i,j}w_q_{i,q}}{\sqrt{\sum _{i=1}^N w_d_{i,j}^2}\sqrt{\sum _{i=1}^N w_q_{i,q}^2}}</math>
 
As all vectors under consideration by this model are element-wise nonnegative, a cosine value of zero means that the query and document vector are [[orthogonal]] and have no match (i.e. the query term does not exist in the document being considered). See [[cosine similarity]] for further information.