100% found this document useful (1 vote)
164 views6 pages

Example: 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 collaborative filtering predicts a user's rating for an item based on ratings from similar users. It first measures similarity between the active user and other users based on correlations in their ratings. The k most similar neighbors are selected. Then, a weighted average of the neighbors' ratings for that item is calculated to make the prediction, with more similar neighbors weighted higher. For example, if predicting what Alice would rate Item5, it would take a weighted average of the ratings from the two most similar users, Users 1 and 4.

Uploaded by

Rajasekhar Reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
164 views6 pages

Example: 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 collaborative filtering predicts a user's rating for an item based on ratings from similar users. It first measures similarity between the active user and other users based on correlations in their ratings. The k most similar neighbors are selected. Then, a weighted average of the neighbors' ratings for that item is calculated to make the prediction, with more similar neighbors weighted higher. For example, if predicting what Alice would rate Item5, it would take a weighted average of the ratings from the two most similar users, Users 1 and 4.

Uploaded by

Rajasekhar Reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 6

User-based nearest-neighbor

collaborative filtering

 Example
◦ A database of ratings of the current user, Alice, and some other users is given:

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

◦ Determine whether Alice will like or dislike Item5, which Alice has not yet rated or
seen
User-based nearest-neighbor
collaborative filtering
 Some first questions
◦ How do we measure similarity?
◦ How many neighbors should we consider?
◦ How do we generate a prediction from the
neighbors' ratings?
Item1 Item2 Item3 Item4 Item5
Alice 5 3 4 4 ?
User1 3 1 2 3 3
User2 4 3 4 3 ?
User3 3 3 1 5 4
User4 1 5 5 2 1
Measuring user similarity

  

Item1 Item2 Item3 Item4 Item5


  Alice 5 3 4 4 ?
User1 3 1 2 3 3 sim = 0,85
User2 4 3 4 3 5 sim = 0,00
User3 3 3 1 5 4 sim = 0,70
User4 1 5 5 2 1 sim = -0,79
Pearson correlation

 Takes differences in rating behavior into account

6 Alice
User
5 1
User
4 4

Ratings
3

0
Item1 Item2 Item3 Item4

 Works well in usual domains, compared with alternative measures


◦ such as cosine similarity
 Making predictions

  
 
 Example

Neighborhood of 2 (A and D)
C’s mean = 3.667
S(C,A) = 0.832
S(C,D)=-0.515
(0.832) ∗ ሺ5 − 4ሻ+ (−0.515) ∗ (3 − 3)
= 3.667 +
|0.832| + |ሺ−0.515ሻ|

0.832
= 3.667 +
1.347
= 4.284

You might also like