<p>Pearson's correlation is undefined when the variance of one of the random variables is 0, I would look for a more credible source to read from.</p>

CC BY-SA 3.0
2013-07-25T19:07:39.503Z
2013-07-25T19:07:39.503Z
Valentas
<p>I'm researching for an algorithm for item-based/user-based collaborative filtering and I've come to this <a href="http://devlicio.us/blogs/billy_mccafferty/archive/2006/11/07/netflix-memoirs-using-the-pearson-correlation-coefficient.aspx" rel="nofollow">site</a>.</p>

<p>It uses Pearson correlation coefficient to compute similarity between users and when I read this line:</p>

<blockquote>
  <p>A strength of this formula is that it takes into account average
  ratings for each user. So if user a rates everything a 5 and user u
  rates everything a 1, then they still have a similarity rating of 1.</p>
</blockquote>

<p>I wonder why it would give a similarity of 1 because using the said equation which is the Pearson and using the given (user a, <strong>5</strong> and user u, <strong>1</strong>), it would give a zero for the numerator and denominator.</p>

<p>So what is the reason he said that the similarity of user a and user u with a rating of 5 and 1, respectively is equal to one? Is zero over zero equals to one?</p>

CC BY-SA 3.0
2017-08-31T03:00:54.300Z
@Valentas if that is true, How could you show correlation between the actual count of operations in your algorithm and the theoretical complexity?.
Brian Bohe
<ds.algorithms><machine-learning><lg.learning>
Using Pearson Correlation Coefficient in computing user/item similarity
Harvey
# Using Pearson Correlation Coefficient in computing user/item similarity

(Asked by: username_0 on 2013-07-25)

I'm researching for an algorithm for item-based/user-based collaborative filtering and I've come to this [site](http://devlicio.us/blogs/billy_mccafferty/archive/2006/11/07/netflix-memoirs-using-the-pearson-correlation-coefficient.aspx).

It uses Pearson correlation coefficient to compute similarity between users and when I read this line:

> A strength of this formula is that it takes into account average
> ratings for each user. So if user a rates everything a 5 and user u
> rates everything a 1, then they still have a similarity rating of 1.

I wonder why it would give a similarity of 1 because using the said equation which is the Pearson and using the given (user a, **5** and user u, **1**), it would give a zero for the numerator and denominator.

So what is the reason he said that the similarity of user a and user u with a rating of 5 and 1, respectively is equal to one? Is zero over zero equals to one?

**Tags:** ds.algorithms, machine-learning, lg.learning

> **Comments:**
> **username_1**: @username_2 if that is true, How could you show correlation between the actual count of operations in your algorithm and the theoretical complexity?.  

---

## 1 answers

### Answer by username_2 on 2013-07-25. Score: 3 | Accepted answer

Pearson's correlation is undefined when the variance of one of the random variables is 0, I would look for a more credible source to read from.


---

