Euclidean distance vs Pearson correlation vs cosine similarity?

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.

Pearson相关系数用来衡量两个数据集合是否在一条线上面。其计算公式为:
Euclidean distance vs Pearson correlation vs cosine similarity?_第1张图片

你可能感兴趣的:(function,distance)