July 2018
Beginner to intermediate
146 pages
3h 39m
English
Consider two users, Alice and Bob, who have rated the same five movies. Alice is extremely stingy with her ratings and never gives more than a 4 to any movie. On the other hand, Bob is more liberal and never gives anything below a 2 when rating movies. Let's define the matrices representing Alice and Bob and compute their Euclidean distance:
alice = [1,1,3,2,4]bob = [2,2,4,3,5]euclidean(alice, bob)OUTPUT:2.2360679774997898
We get a Euclidean distance of about 2.23. However, on closer inspection, we see that Bob always gives a rating that is one higher than Alice. Therefore, we can say that Alice and Bob's ratings are extremely correlated. In other words, if we know Alice's rating for a movie, we can compute Bob's rating ...
Read now
Unlock full access