Their goals are all the same: to find similar vectors. Which do you use in which situation? (any practical examples?)
+4
A:
Pearson correlation and cosine similarity are invariant to scaling, i.e. multiplying all elements by a nonzero constant. Pearson correlation is also invariant to adding any constant to all elements. For example, if you have two vectors X1 and X2, and your Pearson correlation function is called pearson()
, pearson(X1, X2) == pearson(X1, 2 * X2 + 3)
. This is a pretty important property because you often don't care that two vectors are similar in absolute terms, only that they vary in the same way.
dsimcha
2009-12-03 14:04:14
Thanks. THis is the type of answer I"m looking for@!
TIMEX
2009-12-03 19:50:53
Apologies. I was slightly wrong. Cosine similarity is **not** invariant to adding a constant to all elements. I've fixed this. The larger point still holds.
dsimcha
2010-01-24 02:01:01