Module5 Recommender Systems PartB
Module5 Recommender Systems PartB
Universität Mannheim – Bizer/Ponzetto: Web Usage Mining – FFS2017 (Version: 12.2.2017) – Slide 25
Paradigms of Recommender Systems- Recall from
Part A
Personalized
recommendations
Demographic Recommendation
Offer Backstreet Boys albums only to girls under 16
Offer cameras with American electricity plug to people from US.
1. User’s Perspective
Recommend me items that I like and did not know about
Serendipity: Accident of finding something good
while not specifically searching for it
Recommend
items from the
long tail
2. Merchant’s Perspective
Increase the sale of high-revenue items
Thus real-world recommender systems are not as neutral as
the following slides suggest
4. Collaborative Filtering (CF)
Approach
use the "wisdom of the crowd" to recommend items
Basic Assumptions
1. Users give ratings to catalog items (implicitly or explicitly)
2. Customers who had similar tastes in the past,
will have similar tastes in the future
6 Alice
5 User1
User4
4
Ratings
3
0
Item1 Item2 Item3 Item4
Given these calculation schemes, we can now compute rating predictions for Alice for all
items she has not yet seen and include the ones with the highest prediction values in the
recommendation list. In the example, it will most probably be a good choice to include
Item5 in such a list
Improving the Metrics / Prediction Function
Neighborhood Selection
Use fixed number of neighbors or similarity threshold
Case Amplification
Intuition: Give more weight to "very similar" neighbors,
i.e., where the similarity value is close to 1.
Implementation: sim a, b 2
Rating Variance
Agreement on commonly liked items is not so informative as
agreement on controversial items
Possible solution: Give more weight to items that have a higher
variance
Memory-based and Model-based Approaches
Model-based approaches
employ offline model-learning
at run-time, the learned model is used to make predictions
models are updated / re-trained periodically
A large variety of techniques is used
1. Item-based Collaborative Filtering
2. Association Rules
3. Probabilistic Methods
4. Matrix Factorization Techniques
Item-based Collaborative Filtering
Basic idea:
Use the similarity between items (and not users) to make predictions
Approach:
1. Look for items that have been rated similarly as Item5
2. Take Alice's ratings for these items to predict the rating for Item5
Cosine Similarity
Often produces better results as Pearson for calculating the
item-to-item similarity.
a· b a ·b
sim a, b =
a ∗|b| a
∑u∈U(ru,a —r u ) (ru,b —r u )
sim a, b =
2 2
∑u∈U ru,a —r u ∑u∈U r u,b —r u
Computing Cosine Similarity
between Item 5 and Item1,
Making Predictions
Memory requirements
Up to N2 pair-wise similarities to be memorized (N = number of items)
in theory
In practice, the memory requirements are significantly lower as
- many items have no co-ratings (heavy metal and samba CDs)
- neighborhood size often limited to max items above minimum similarity
threshold
MODEL BASED APPROACHES
Recap: Association Rule Mining
Commonly used for shopping basket analysis
aims at detection of rules such as "If a customer purchases beer
then he also buys diapers in 70% of the cases"
Items co-
occurring with
book in frequent
item sets
Personalized Recommendation using Association Rules
P X Y × P(Y) ∏i=1
d
P Xi Y × P(Y) See: IE500
P YX = P YX = Data Mining:
P(X) P(X) Chapter 3
• As P(X) is a constant value, we can omit it in our
calculations. P(Y ) can be estimated for each rating value
based on the ratings database: P(Item5=1) = 2/4 (as two
of four ratings for Item5 had the value 1), P(Item5=2)=0,
and so forth. What remains is the calculation of all
class-conditional probabilities P(Xi|Y ):
Estimation of the Probabilities
Item1 Item2 Item3 Item4 Item5
Alice 1 3 3 2 ?
User1 2 4 2 2 4
X = (Item1 =1, Item2=3, Item3= … )
User2 1 3 3 5 1
User3 4 5 2 3 3
User4 1 1 5 2 1
P X Item5 = 1
= P Item1 = 1 Item5 = 1 × P Item2 = 3 Item5 = 1
2 1 1 1
× P Item3 = 3 Item5 = 1 × P Item4 = 2 Item5 = 1 = × × ×
2 2 2 2
= 0. 125
Based on these calculations, given that P(Item5=1) = 2/4 and omitting the
constant factor P(X) in the Bayes classifier, the posterior probability of a rating
value 1 for Item5 is P(Item5 = 1|X) = 2/4 × 0.125 = 0.0625. In the example
ratings database, P(Item5=1) is higher than all other probabilities, which
means that the probabilistic rating prediction for Alice will be 1 for Item5.
More on Ratings: Explicit Ratings
Explicit ratings are probably the most precise ratings.
Commonly used response scales:
1 to 5 Likert scales
Like (sometimes also Dislike)
Main problems
Users often not willing to rate items
- number of ratings likely to be too small
→ poor recommendation quality
How to stimulate users to rate more items?
- Example: Amazon Betterizer
Alternative
Use implicit ratings
(in addition to explicit ones)
More on Ratings: Implicit Ratings
Events potentially interpretable as positive ratings
items bought
clicks, page views
time spent on some page
demo downloads …
Advantage
implicit ratings can be collected constantly by the web site
or application in which the recommender system is embedded
collection of ratings does not require additional effort from the user
Problem
one cannot be sure whether the user behavior is correctly interpreted
for example, a user might not like all the books he or she has bought;
the user also might have bought a book for someone else
Collaborative Filtering Discussion
Pros:
works well in some domains: books, movies. Likely not: life insurances
requires no explicit item descriptions or demographic user profiles
Cons:
requires user community to give enough ratings
(many real-world systems thus employ implicit ratings)
no exploitation of other sources of recommendation knowledge
(demographic data, item descriptions)
Cold Start Problem
- How to recommend new items?
- What to recommend to new users?
Approaches for dealing with the Cold Start Problem
- Ask/force users to rate a set of items
- Use another method or combination of methods (e.g., content-based,
demographic or simply non-personalized) until enough ratings are
collected
4.2 Content-based Recommendation
What do we need:
information about the available items (content)
some sort of user profile describing what the user likes (user preferences)
The tasks:
1. learn user preferences from what she has bought/seen before
2. recommend items that are "similar" to the user preferences
"show me more
of the same
what I've liked"
Content and User Profile Representation
Content Representation
Title Genre Author Type Price Keywords
The Night of Memoir David Carr Paperback 29.90 Press and journalism, drug
the Gun addiction, personal memoirs,
New York
The Lace Fiction, Brunonia Hardcover 49.90 American contemporary fiction,
Reader Mystery Barry detective, historical
Into the Fire Romance, Suzanne Hardcover 45.90 American fiction, murder, neo-
Suspense Brockmann nazism
User Profile
Title Genres Authors Types Avg. Keywords
Price
… Fiction. Brunonia, Paperback 25.65 Detective, murder,
Mystery Barry, Ken New York
Follett
Cleopatra 17 0 52 Cleopatra 57 12 0
mercy 1 0 43 mercy 22 23 90
Similarity of Text Documents
Challenges
terms vectors are very sparse
not every word has the same importance
long documents have higher chance to overlap with user profile
2. Use ratings from Alice for neighbors to predict a rating for item i
Find 5 most similar items to i
4 of these items were liked by Alice item i will also be liked by Alice
Variations:
Varying neighborhood size k
upper similarity threshold to prevent system from recommending too similar
texts (variations of texts the user has already seen)
Pros:
In contrast to collaborative approaches, content-based techniques
do not require user community in order to work
No problems with recommending new items
Cons:
Require to learn a suitable model of user's preferences based on
explicit or implicit feedback
- deriving implicit feedback from user behavior can be problematic
- ramp-up phase required (users needs to view/rate some items)
- Web 2.0: Use other sources to learn the user preferences might be an
option (e.g. share your Facebook profile with e-shop)
Overspecialization
- Algorithms tend to propose "more of the same"
- Recommendations might be boring as items are too similar
4.3 Hybrid Recommender Systems
n
• Compute weighted sum: rec weighted u, i k reck u, i
k 1
Recommender 1 Recommender 2
Item1 0.5 1 Item1 0.8 2
Item2 0 Item2 0.9 1
Item3 0.3 2 Item3 0.4 3
Item4 0.1 3 Item4 0
Item5 0 Item5 0
Recommender weighted(0.5:0.5)
Item1 0.65 1
Item2 0.45 2
Item3 0.35 3
Item4 0.05 4
Item5 0.00
Adjustment of Weights
Split-Validation
Split-Validation: e.g. 2/3 training, 1/3 validation
1 n
RMSE ( pi ri )2
n i 1
Critique
Not meaningful as inclusion into Top-K list is more important
to the user than overall accuracy of predictions.
Rather evaluate inclusion into Top-K list as classification
problem (see next slide).
Evaluation of Good/Bad Classifications
Confusion Matrix
Precision: Measure of exactness.
determines the fraction of relevant Reality
items retrieved out of all items retrieved Actually Actually Bad
Good
fraction of recommended movies
that are actually good Good True False
Prediction
Positive (tp) Positive (fp)
Recall: Measure of completeness. Bad False True
determines the fraction of relevant items Negative Negative (tn)
(fn)
retrieved out of all relevant items
E.g. the fraction of all good movies
recommended
F1-Measure
combines Precision and Recall into a
single value for comparison purposes.
May be used to gain a more balanced
view of performance
Evaluation of ranked Top-K List
Item 187
MovieLens
movie ratings collected via MovieLens website
1M Dataset: 6.000 users, 3.900 movies, 1 million ratings
10M Dataset: 71.000 users, 10.600 movies, 10 million ratings
Netflix
provided by commercial movie rental website for Netflix competition
($1,000,000 for 10% better RMSE)
480.000 users rated 18.000 movies, 100M ratings
Yahoo Music
600.000 songs, 1 million users, 300M ratings
provided for KDD Cup 2011