Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Recommender Systems Part 1 - 2021.12.13

059fb717431a8cd2b509ffebc57d905a?s=47 Y. Yamamoto
December 07, 2021

Recommender Systems Part 1 - 2021.12.13

1. Introduction
2. Collaborative Filtering – Part 1
3. Programming Work

059fb717431a8cd2b509ffebc57d905a?s=128

Y. Yamamoto

December 07, 2021
Tweet

Transcript

  1. Recommender Systems & Collaborative Filtering Yusuke Yamamoto Faculty of Informatics

    Associate Professor yusuke_yamamoto@acm.org Data Engineering (Recommender System 1) 2021.12.13
  2. 1 Introduction to Recommender Systems 2

  3. 3 Predicts user preference model and decides which items should

    be recommended. Recommender System
  4. The most familiar recommender system: Amazon(1/2) 4 画像出典:https://www.amazon.co.jp/ Recommend items

    which users will like
  5. The most familiar recommender system: Amazon(2/2) 5 画像出典:https://www.amazon.co.jp/ Recommend items

    related to a target item
  6. SNS x Recommender System 6 User recommendation on Twitter Event

    recommendation on Facebook
  7. Movie recommendation from Netflix 7

  8. Apple Music x Recommender System 8

  9. News x Recommender System 9

  10. Computational Ads 10 画像出典:http://www.apple-style.com

  11. Recommendation Systems appear anywhere! 11

  12. Why using Recommender Systems? 12 Value for end users •

    Find interesting items and information easily • Narrow down the set of choices Value for providers • Increase trust and customer loyalty • Increase sales, click rates, conversion rates etc. • Discover new things.. • Opportunities for promotion
  13. Paradigms of Recommender System 13 Dietmar Jannach氏のRecommender Systems: An IntroductionのPPT資料より

    Recommender System item score item1 0.9 item2 1 item3 0.3 … … User profile & context Recommendation list for a target user 1 Community data 2 Item features 3 User preference model
  14. 3 main approach for recommendation 14 Collaborative filtering Decides which

    items should be recommended, based on users behavior logs. Content-based filtering Decides which items should be recommended, based on item features and their metadata Knowledge-based filtering Decides which items should be recommended, based on preference information which users explicitly show
  15. Problem Definition 15 § User u’ s behavior data Bu

    ={b1 , b2 , …, bn } § Item set I = {i1 , i2 , …, im } § User u’s profile(user model):pu § Relevance between pu and item i :Rel (pu , i) Input Output Ranked list of item set I (∀ i ∈ I), based on Rel (pu , i) s.t. l How to model user profiles? l How to compute relevance? Point
  16. Content list of this lecture 16 1. Collaborative Filtering (CF)

    2. Content-based Filtering 3. Link analysis 4. Advanced CF Lecture + Programming Work so that you can see how methods work
  17. References for this lecture 画像出典:https://www.amazon.co.jp/ 17

  18. 2 Collaborative Filtering – Part 1 18

  19. Collaborative Filtering (CF) 19 Approach Uses user’s rating data to

    model user preferences and to recommend items Basis assumption • Users give ratings to items appropriately • Patterns in the rating data help us predict the ratings Practical points • Large commercial eCommerce sites use the CF • Well-understood • Applicable in many domains if only rating data can be obtained
  20. Example 20 How much does Alice like Item 5? Q.

    Alice Item 1 Item 2 Item 3 Item 4 Item 5 ? Items purchased by Alice and her ratings Un-purchased item A ✓ ✓ ✓ ✓
  21. Let’s observe other users’ ratings 21 Can we predict Alice’s

    rating using others’ ratings? Q. 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
  22. 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 22 Dissimilar Similar Let’s observe other users’ ratings Can we predict Alice’s rating using others’ ratings? Q.
  23. 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 Let’s observe other users’ ratings 23 Alice will give high score to item 5 ! Can we predict Alice’s rating using others’ ratings? Q.
  24. User-based Collaborative Filtering 24 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 Focus on ratings of similar users Idea: Point How to compute user similarity How do we combine the ratings of the similar users to predict Alice’s rating? Which/how many similar users should we consider? 1. 2. 3.
  25. Similarity between users(1/3) 25 Pearson Correlation Coefficient 𝑠𝑖𝑚 𝑢! ,

    𝑢" = ∑#∈% (𝑟&!,# − 𝑟&! )(𝑟&",# − 𝑟&" ) ∑ #∈% 𝑟&!,# − 𝑟&! ( ∑ #∈% 𝑟&!,# − 𝑟&! ( :User a, b 𝑢! , 𝑢" 𝑟#!,% :User a’s rating to item i 𝐼 : Item set 𝑟#! 𝑟#" , :User a, b’s average rating
  26. Similarity between users(2/3) 26 𝑠𝑖𝑚 𝑢! , 𝑢" = ∑#∈%

    (𝑟&!,# − 𝑟&! )(𝑟&",# − 𝑟&" ) ∑ #∈% 𝑟&!,# − 𝑟&! ( ∑ #∈% 𝑟&",# − 𝑟&" ( Item1 Item2 Item3 Item4 Alice 5 3 4 4 User1 3 1 2 3 User2 4 3 4 3 User3 3 3 1 5 User4 1 5 5 2 sim=0.85 sim=-0.79 Pearson Correlation Coefficient
  27. Similarity between users(3/3) 27 𝑠𝑖𝑚 𝑢! , 𝑢" = ∑#∈%

    (𝑟&!,# − 𝑟&! )(𝑟&",# − 𝑟&" ) ∑ #∈% 𝑟&!,# − 𝑟&! ( ∑ #∈% 𝑟&",# − 𝑟&" ( Item1 Item2 Item3 Item4 Alice 5 3 4 4 User1 3 1 2 3 User2 4 3 4 3 User3 3 3 1 5 User4 1 5 5 2 sim = ? Let’s calculate Pearson Correlation Coefficient
  28. Pearson correlation 28 A measure of the linear correlation between

    two variables X and Y 0 1 2 3 4 5 6 Item1 Item2 Item3 Item4 Alice User1 User4 Rating score sim(Alice, User4)=-0.79 sim(Alice, User1)=0.85 (It takes differences in rating behavior into account)
  29. Predicting rating scores based on user similarity(1/3) 29 A typical

    prediction function 𝑝𝑟𝑒𝑑𝑖𝑐𝑡 𝑢! , 𝑖 = 𝑟"# + ∑"$∈$$ 𝑠𝑖𝑚(𝑢! , 𝑢% ) 1 (𝑟"$,' − 𝑟"$ ) ∑"$∈$$ 𝑠𝑖𝑚(𝑢! , 𝑢% ) :Target user a 𝑢& 𝑟#,% :Rating score of u for item i 𝑖 :Target item i 𝑟#! :User a’s average rating score 𝑈' :A set of similar users to ua
  30. Predicting rating scores based on user similarity(2/3) 30 Item5 sim

    Average rating Alice ? 1 4 User1 3 0.85 2.4 User2 5 0.71 3.8 Similar users 4.0 + 0.85× 3 − 2.4 + 0.71×(5 − 3.8) 0.85 + 0.71 = 4.87 Predicted rating score of Alice for Item5 A typical prediction function 𝑝𝑟𝑒𝑑𝑖𝑐𝑡 𝑢! , 𝑖 = 𝑟"# + ∑"$∈$$ 𝑠𝑖𝑚(𝑢! , 𝑢% ) 1 (𝑟"$,' − 𝑟"$ ) ∑"$∈$$ 𝑠𝑖𝑚(𝑢! , 𝑢% )
  31. Predicting rating scores based on user similarity(3/3) 31 Item5 sim

    Average rating Alice ? 1 4 User1 3 0.85 2.4 User2 5 0.71 3.8 Similar users 4.0 + 0.85× 3 − 2.4 + 0.71×(5 − 3.8) 0.85 + 0.71 = 4.87 Predicted rating score of Alice for Item5 A typical prediction function How to choose similar users? Q. 𝑝𝑟𝑒𝑑𝑖𝑐𝑡 𝑢! , 𝑖 = 𝑟"# + ∑"$∈$$ 𝑠𝑖𝑚(𝑢! , 𝑢% ) 1 (𝑟"$,' − 𝑟"$ ) ∑"$∈$$ 𝑠𝑖𝑚(𝑢! , 𝑢% )
  32. How to decide “similar users” (nearest neighbors)? 32 Set a

    threshold for user similarity • If a user has higher similarity than a threshold, he/she can be regarded as a “similar” user • In worst cases, no similar users will be found Focus on top K similar users (kNN method) • If a user ranks at the top K similarity, he/she can be regarded as a similar user • K is often set to between 50 〜 200 • In worst cases, a system uses rating information of users with low similarity
  33. Summary of User-based Collaborative Filtering 33 Basic Approach • User

    similarities are obtained from a rating matrix • Based on rating scores of similar users, systems predict a rating score of target user for a target item Similarity Calculation Pearson correlation coefficient is often used Selection of Similar Users Top K users with high similarity are often selected as similar users
  34. 3 Programming Work 34

  35. 35 Visit the following URL: https://recsys2021.hontolab.org/