23. Goodness-of-recommendation (GoR) function
Similarity of
movie to user 1
movie
Similarity of
movie to user 2
movie
GoR(movie)=mean(s1,s2) - 0.25diff(s1,s2)
If average similarity
to the input movies
is high, that’s good!
If movie is very
similar to user 1
movie but not
user 2 movie (or
vice versa), that’s
bad!
24. Algorithm
Ratings Table
Movies->
Users->
1
2
3
4
5
f(
Clue Kids Jaws Babe Big
5
3
4
5
None
None
5
1
5
None
3
None
1
4
3
1
5
1
4
3
2
4
1
4
5
Clue
1
0.2
0.3
0.4
0.5
,
Babe
0.4
0.2
0.2
1
0.5
)=
0.6
0.2
0.225
0.6
0.5
Movies Similarity Matrix
Clue
Kids
Jaws
Babe
Big
Clue Kids Jaws Babe Big
1
0.2
0.3
0.4
0.5
0.2
1
0.3
0.2
0.3
0.3
0.3
1
0.2
0.3
0.4
0.2
0.2
1
0.5
0.5
0.3
0.3
0.5
1
Say User 1 likes Clue
User 2 likes Babe
Clue
Kids
Jaws
Babe
Big
Clue Kids Jaws Babe Big
1
0.2
0.3
0.4
0.5
0.2
1
0.3
0.2
0.3
0.3
0.3
1
0.2
0.3
0.4
0.2
0.2
1
0.5
0.5
0.3
0.3
0.5
1
Largest number is for the movie Big. Users should watch it!
f(s1,s2)=mean(s1,s2)-α*diff(s1,s2)
For multiple input movies,
f(s1,1,s1,2,…,s2,1,s2,2,…) = mean(s1,1,s1,2,…,s2,1,s2,2,…)α*std(s1,1,s1,2,…,s2,1,s2,2,…)-β*diff(mean(s1,1,s1,2,…),mean(s2,1,s2,2,…))
25. Cross-Validation
Movies Similarity Matrix
Ratings Table
Movies->
Users->
Training Set
Ground Truth
Clue Kids Jaws Babe Big
Test Set
Features
1
Consider two users in test set
Features
Test Set
1
5
2
4
5
1
5
2
My Recommendations
Clue Kids Jaws Babe Big
Ground
Truth
User 1
User 2
Use algorithm and similarity matrix on
then compare predictions and truth
3
2
Ground
Truth
4
to predict
Y
Y
Y