Tutorial Example

Understand the Relationship Between Pearson Correlation Coefficient and Cosine Similarity – Machine Learning Tutorial

Pearson Correlation Coefficient and Cosine Similarity can measure the correlation between two varialbes, both of them are in [-1, 1]. In this tutorial, we will discuss the relationship between them.

As to pearson correlation coefficient, it is defined as:

As to cosine similarity, it is defined as:

We can find:

It means pearson correlation coefficient is the cosine similarity between centered versions of \(x\) and \(y\).