Cannot understand why cosine similarity is calculated as $\cos(u,v) = 1 - \frac{u\cdot v}{\|u\|_2 \cdot \|v\|_2}$

69 Views Asked by At

I am reading this article (PDF via arXiv.org).

At page 3 of the PDF, right column, under section 3.2 "Quantifying Bias Removal", there is a formula to calculate the cosine distance between two vectors:

$$\cos(\mathbf{u},\mathbf{v}) = 1 - \dfrac{\mathbf{u} \cdot \mathbf{v}}{\|u\|_2 \cdot \|v\|_2} \tag1$$

But I thought that in an Euclidean space:

$$\mathbf{u} \cdot \mathbf{v} = \|u\|_2 \cdot \|v\|_2 \cdot \cos(\theta) \tag2$$

So the right hand side of $(1)$ would be $ 1-\cos(\theta) $ and not $\cos(\theta)$.

1

There are 1 best solutions below

0
On BEST ANSWER

Notice that "cosine distance" is actually different from "cosine"(which is defined in analytical geometry textbooks). It is just a new concept lead into the context by the author himself for further descriptions.