Week 6 Recommender
Week 6 Recommender
SNA
Social Networks Analysis
Prepared by:
Dr.Nesma Ebrahim
ORCID: orcid.org/0000-0001-6677-2837
Web of Science Researcher
Google Scholar Citation: Nesma Ebrahim Elsayd
Assistant Professor , Computer Science
1
2- Collaborative Filtering Recommender System
Collaborative Filtering
• Consider user x
44
Rating Matrix: An Example
55
Rating Matrix
Explicit ratings:
– entered by a user directly
– i.e., “Please rate this on a scale of 1-5”
Implicit ratings:
– Inferred from other user behavior
– E.g., Play lists or music listened to, for a music Rec system
– The amount of time users spent on a webpage
66
Memory-Based Collaborative Filtering
User-based CF
Users with similar previous
ratings for items are likely to rate
future items similarly
Item-based CF
Items that have received similar
ratings previously from users are
likely to receive similar ratings
from future users
77
Collaborative Filtering: Algorithm
88
Finding “Similar” Users
•
representation as sets:
Rx = {1, 4, 5}
Ry = {1, 3, 4}
User-based nearest-neighbor
collaborative filtering (1)
The basic technique:
Given an "active user" (Alice) and an item I not yet seen by
Alice
The goal is to estimate Alice's rating for this item, e.g., by
find a set of users (peers) who liked the same items as Alice in the
past and who have rated item I
use, e.g. the average of their ratings to predict, if Alice will like item I
do this for all items Alice has not seen and recommend the best-rated
Item1 Item2 Item3 Item4 Item5
Alice 5 3 4 4 ?
User1 3 1 2 3 3
User2 4 3 4 3 5
User3 3 3 1 5 4
User4 1 5 5 2 1
User-based nearest-neighbor
collaborative filtering (2)
Some first questions
How do we measure similarity?
How many neighbors should we consider?
How do we generate a prediction from the neighbors' ratings?
a, b : users
ra,p : rating of user a for item p
P : set of items, rated both by a and b
Possible similarity values between -1 and 1; = user's average ratings