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.
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.
The difference between Pearson Correlation Coefficient and Cosine Similarity can be seen from their formulas:
The reason Pearson Correlation Coefficient is invariant to adding any constant is that the means are subtracted out by construction. It is also easy to see that Pearson Correlation Coefficient and Cosine Similarity are equivalent when X and Y have means of 0, so we can think of Pearson Correlation Coefficient as demeaned version of Cosine Similarity.
Comments
0 comments
Article is closed for comments.