The Euclidean distance score is a good metric, but it has some shortcomings. Hence, the Pearson correlation score is frequently used in recommendation engines. The Pearson correlation score between two statistical variables is an index that expresses a possible linear relation between them. It measures the tendency of two numerical variables to vary simultaneously.
Computing the Pearson correlation score
Getting ready
In this recipe, we will see how to compute the Pearson correlation score.
How to do it...
Let's take a look at how to compute the Pearson correlation...