Cosine Similarity
Measures the angle between two vectors rather than the distance, ranging from (opposite) to (identical direction) and ignoring vector length. For non-negative feature vectors it runs from 0 to 1.
When to use
Use it for recommenders and text, where vectors are sparse and users have personal rating scales: two users rating 4 to 5 and 2 to 3 are far apart by Euclidean Distance but near-identical by cosine. The formula is .
See Lec 6.