0% found this document useful (0 votes)
3 views

RecommenderSystems-Shortened

The document provides an overview of recommender systems, their applications, and the underlying techniques such as collaborative filtering, content-based filtering, and knowledge-based recommendations. It discusses the value these systems offer to both customers and providers, as well as the challenges they face, including data sparsity and cold start problems. Additionally, it highlights various algorithms and approaches used to improve recommendation accuracy and scalability.

Uploaded by

nkviet.sdh242
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

RecommenderSystems-Shortened

The document provides an overview of recommender systems, their applications, and the underlying techniques such as collaborative filtering, content-based filtering, and knowledge-based recommendations. It discusses the value these systems offer to both customers and providers, as well as the challenges they face, including data sparsity and cold start problems. Additionally, it highlights various algorithms and approaches used to improve recommendation accuracy and scalability.

Uploaded by

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

Recommender Systems

Tho Quan
[email protected]

-1-
-2-
Recommender Systems

 Application areas

-3-
In the Social Web

-4-
Even more …

 Personalized search

 "Computational advertising"

-5-
Agenda

 What are recommender systems for?


– Introduction
 How do they work (Part I) ?
– Collaborative Filtering
 How to measure their success?
– Evaluation techniques
 How do they work (Part II) ?
– Content-based Filtering
– Knowledge-Based Recommendations

-6-
-7-
Why using Recommender Systems?

 Value for the customer


– Find things that are interesting
– Narrow down the set of choices
– Help me explore the space of options
– Discover new things
– Entertainment
– …
 Value for the provider
– Additional and probably unique personalized service for the customer
– Increase trust and customer loyalty
– Increase sales, click trough rates, conversion etc.
– Opportunities for promotion, persuasion
– Obtain more knowledge about customers
– …
-8-
Real-world check

 Myths from industry


– Amazon.com generates X percent of their sales through the recommendation
lists (30 < X < 70)
– Netflix (DVD rental and movie streaming) generates X percent of their sales
through the recommendation lists (30 < X < 70)
 There must be some value in it
– See recommendation of groups, jobs or people on LinkedIn
– Friend recommendation and ad personalization on Facebook
– Song recommendation at last.fm
– News recommendation at Forbes.com (plus 37% CTR)
 Academia
– A few studies exist that show the effect
 increased sales, changes in sales behavior

-9-
Problem domain

 Recommendation systems (RS) help to match users with items


– Ease information overload
– Sales assistance (guidance, advisory, persuasion,…)

RS are software agents that elicit the interests and preferences of individual
consumers […] and make recommendations accordingly.
They have the potential to support and improve the quality of the
decisions consumers make while searching for and selecting products online.
» [Xiao & Benbasat, MISQ, 2007]

 Different system designs / paradigms


– Based on availability of exploitable data
– Implicit and explicit user feedback
– Domain characteristics
- 10 -
Recommender systems

 RS seen as a function [AT05]


 Given:
– User model (e.g. ratings, preferences, demographics, situational context)
– Items (with or without description of item characteristics)
 Find:
– Relevance score. Used for ranking.
 Finally:
– Recommend items that are assumed to be relevant
 But:
– Remember that relevance might be context-dependent
– Characteristics of the list itself might be important (diversity)

- 11 -
Paradigms of recommender systems

Recommender systems reduce


information overload by estimating
relevance

- 12 -
Paradigms of recommender systems

Personalized recommendations

- 13 -
Paradigms of recommender systems

Collaborative: "Tell me what's popular


among my peers"

- 14 -
Paradigms of recommender systems

Content-based: "Show me more of the


same what I've liked"

- 15 -
Paradigms of recommender systems

Knowledge-based: "Tell me what fits


based on my needs"

- 16 -
Paradigms of recommender systems

Hybrid: combinations of various inputs


and/or composition of different
mechanism

- 17 -
Recommender systems: basic techniques

Pros Cons
Collaborative No knowledge- Requires some form of rating
engineering effort, feedback, cold start for new users
serendipity of results, and new items
learns market segments
Content-based No community required, Content descriptions necessary,
comparison between cold start for new users, no
items possible surprises

Knowledge-based Deterministic Knowledge engineering effort to


recommendations, bootstrap, basically static, does
assured quality, no cold- not react to short-term trends
start, can resemble sales
dialogue

- 18 -
- 19 -
Collaborative Filtering (CF)

 The most prominent approach to generate recommendations


– used by large, commercial e-commerce sites
– well-understood, various algorithms and variations exist
– applicable in many domains (book, movies, DVDs, ..)
 Approach
– use the "wisdom of the crowd" to recommend items
 Basic assumption and idea
– Users give ratings to catalog items (implicitly or explicitly)
– Customers who had similar tastes in the past, will have similar tastes in the
future

- 20 -
1992: Using collaborative filtering to weave an information
tapestry, D. Goldberg et al., Communications of the ACM

 Basic idea: "Eager readers read all docs immediately, casual readers wait
for the eager readers to annotate"
 Experimental mail system at Xerox Parc that records reactions of users
when reading a mail
 Users are provided with personalized mailing list filters instead of being
forced to subscribe
– Content-based filters (topics, from/to/subject…)
– Collaborative filters

 E.g. Mails to [all] which were replied by [John Doe] and which received
positive ratings from [X] and [Y].

- 21 -
1994: GroupLens: an open architecture for collaborative filtering of
netnews, P. Resnick et al., ACM CSCW

 Tapestry system does not aggregate ratings and requires knowing each
other
 Basic idea: "People who agreed in their subjective evaluations in the
past are likely to agree again in the future"
 Builds on newsgroup browsers with rating functionality

- 22 -
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
- 23 -
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?

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

- 24 -
Measuring user similarity

 A popular similarity measure in user-based CF: Pearson correlation

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

Item1 Item2 Item3 Item4 Item5


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

 Takes differences in rating behavior into account

6 Alice

5 User1

User4
4
Ratings
3

0
Item1 Item2 Item3 Item4

 Works well in usual domains, compared with alternative measures


– such as cosine similarity

- 26 -
Making predictions

 A common prediction function:

 Calculate, whether the neighbors' ratings for the unseen item i are higher
or lower than their average
 Combine the rating differences – use the similarity as a weight
 Add/subtract the neighbors' bias from the active user's average and use
this as a prediction

- 27 -
Making recommendations

 Making predictions is typically not the ultimate goal


 Usual approach (in academia)
– Rank items based on their predicted ratings
 However
– This might lead to the inclusion of (only) niche items
– In practice also: Take item popularity into account
 Approaches
– "Learning to rank"
 Optimize according to a given rank evaluation metric (see later)

- 28 -
Improving the metrics / prediction function

 Not all neighbor ratings might be equally "valuable"


– 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
 Value of number of co-rated items
– Use "significance weighting", by e.g., linearly reducing the weight when the
number of co-rated items is low
 Case amplification
– Intuition: Give more weight to "very similar" neighbors, i.e., where the
similarity value is close to 1.
 Neighborhood selection
– Use similarity threshold or fixed number of neighbors

- 29 -
Memory-based and model-based approaches

 User-based CF is said to be "memory-based"


– the rating matrix is directly used to find neighbors / make predictions
– does not scale for most real-world scenarios
– large e-commerce sites have tens of millions of customers and millions of
items
 Model-based approaches
– based on an offline pre-processing or "model-learning" phase
– at run-time, only the learned model is used to make predictions
– models are updated / re-trained periodically
– large variety of techniques used
– model-building and updating can be computationally expensive

- 30 -
2001: Item-based collaborative filtering recommendation algorithms, B.
Sarwar et al., WWW 2001

 Scalability issues arise with U2U if many more users than items
(m >> n , m = |users|, n = |items|)
– e.g. Amazon.com
– Space complexity O(m2) when pre-computed
– Time complexity for computing Pearson O(m2n)

 High sparsity leads to few common ratings between two users

 Basic idea: "Item-based CF exploits relationships between items first,


instead of relationships between users"

- 31 -
Item-based collaborative filtering

 Basic idea:
– Use the similarity between items (and not users) to make predictions
 Example:
– Look for items that are similar to Item5
– Take Alice's ratings for these items to predict the rating for Item5

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

- 32 -
The cosine similarity measure

 Produces better results in item-to-item filtering


– for some datasets, no consistent picture in literature
 Ratings are seen as vector in n-dimensional space
 Similarity is calculated based on the angle between the vectors

 Adjusted cosine similarity


– take average user ratings into account, transform the original ratings
– U: set of users who have rated both items a and b

- 33 -
Pre-processing for item-based filtering

 Item-based filtering does not solve the scalability problem itself


 Pre-processing approach by Amazon.com (in 2003)
– Calculate all pair-wise item similarities in advance
– The neighborhood to be used at run-time is typically rather small, because
only items are taken into account which the user has rated
– Item similarities are supposed to be more stable than user similarities
 Memory requirements
– Up to N2 pair-wise similarities to be memorized (N = number of items) in
theory
– In practice, this is significantly lower (items with no co-ratings)
– Further reductions possible
 Minimum threshold for co-ratings (items, which are rated at least by n users)
 Limit the size of the neighborhood (might affect recommendation accuracy)

- 34 -
More on ratings

 Pure CF-based systems only rely on the rating matrix


 Explicit ratings
– Most commonly used (1 to 5, 1 to 7 Likert response scales)
– Research topics
 "Optimal" granularity of scale; indication that 10-point scale is better accepted in
movie domain
 Multidimensional ratings (multiple ratings per movie)
– Challenge
 Users not always willing to rate many items; sparse rating matrices
 How to stimulate users to rate more items?

 Implicit ratings
– clicks, page views, time spent on some page, demo downloads …
– Can be used in addition to explicit ones; question of correctness of interpretation

- 35 -
Data sparsity problems

 Cold start problem


– How to recommend new items? What to recommend to new users?
 Straightforward approaches
– Ask/force users to rate a set of items
– Use another method (e.g., content-based, demographic or simply non-
personalized) in the initial phase
 Alternatives
– Use better algorithms (beyond nearest-neighbor approaches)
– Example:
 In nearest-neighbor approaches, the set of sufficiently similar neighbors might
be to small to make good predictions
 Assume "transitivity" of neighborhoods

- 36 -
Example algorithms for sparse datasets

 Recursive CF
– Assume there is a very close neighbor n of u who however has not rated the
target item i yet.
– Idea:
 Apply CF-method recursively and predict a rating for item i for the neighbor
 Use this predicted rating instead of the rating of a more distant direct
neighbor

Item1 Item2 Item3 Item4 Item5


Alice 5 3 4 4 ?
sim = 0,85
User1 3 1 2 3 ?
User2 4 3 4 3 5
Predict
User3 3 3 1 5 4 rating for
User4 1 5 5 2 1 User1
- 37 -
Graph-based methods

 "Spreading activation" (sketch)


– Idea: Use paths of lengths > 3
to recommend items
– Length 3: Recommend Item3 to User1
– Length 5: Item1 also recommendable

- 38 -
More model-based approaches

 Plethora of different techniques proposed in the last years, e.g.,


– Matrix factorization techniques, statistics
 singular value decomposition, principal component analysis
– Association rule mining
 compare: shopping basket analysis
– Probabilistic models
 clustering models, Bayesian networks, probabilistic Latent Semantic Analysis
– Various other machine learning approaches
 Costs of pre-processing
– Usually not discussed
– Incremental updates possible?

- 39 -
2000: Application of Dimensionality Reduction in
Recommender System, B. Sarwar et al., WebKDD Workshop

 Basic idea: Trade more complex offline model building for faster online
prediction generation
 Singular Value Decomposition for dimensionality reduction of rating
matrices
– Captures important factors/aspects and their weights in the data
– factors can be genre, actors but also non-understandable ones
– Assumption that k dimensions capture the signals and filter out noise (K = 20 to 100)

 Constant time to make recommendations


 Approach also popular in IR (Latent Semantic Indexing), data
compression, …

- 40 -
A picture says …

1
Sue
0.8

0.6

0.4

0.2
Bob
Mary
0
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
-0.2

-0.4
Alice

-0.6

-0.8

-1

- 41 -
Matrix factorization

M k  U k   k  Vk
T
• SVD:

Uk Dim1 Dim2 VkT


Alice 0.47 -0.30 Dim1 -0.44 -0.57 0.06 0.38 0.57
Bob -0.44 0.23 Dim2 0.58 -0.66 0.26 0.18 -0.36
Mary 0.70 -0.06
Sue 0.31 0.93 k Dim1 Dim2
Dim1 5.63 0
• Prediction: rˆui  ru  U k ( Alice)   k  VkT ( EPL )
= 3 + 0.84 = 3.84 Dim2 0 3.23

- 42 -
Association rule mining

 Commonly used for shopping behavior analysis


– aims at detection of rules such as
"If a customer purchases baby-food then he also buys diapers
in 70% of the cases"
 Association rule mining algorithms
– can detect rules of the form X => Y (e.g., baby-food => diapers) from a set of
sales transactions D = {t1, t2, … tn}
– measure of quality: support, confidence

- 43 -
Probabilistic methods

 Basic idea (simplistic version for illustration):


– given the user/item rating matrix
– determine the probability that user Alice will like an item i
– base the recommendation on such these probabilities
 Calculation of rating probabilities based on Bayes Theorem
– How probable is rating value "1" for Item5 given Alice's previous ratings?
– Corresponds to conditional probability P(Item5=1 | X), where
 X = Alice's previous ratings = (Item1 =1, Item2=3, Item3= … )
– Can be estimated based on Bayes' Theorem
 Usually more sophisticated methods used
– Clustering
– pLSA …

- 44 -
2008: Factorization meets the neighborhood: a multifaceted collaborative
filtering model, Y. Koren, ACM SIGKDD

 Stimulated by work on Netflix competition


– Prize of $1,000,000 for accuracy improvement of 10% RMSE
compared to own Cinematch system
– Very large dataset (~100M ratings, ~480K users , ~18K
movies)
– Last ratings/user withheld (set K)

 Root mean squared error metric optimized to


0.8567

 (rˆui  rui ) 2
( u ,i )K
RMSE 
K

- 45 -
2008: Factorization meets the neighborhood: a multifaceted collaborative
filtering model, Y. Koren, ACM SIGKDD

 Merges neighborhood models with latent factor models


 Latent factor models
– good to capture weak signals in the overall data

 Neighborhood models
– good at detecting strong relationships between close items
 Combination in one prediction single function
– Local search method such as stochastic gradient descent to determine
parameters
– Add penalty for high values to avoid over-fitting

rˆui    bu  bi  puT qi
 (rui    bu  bi  puT qi ) 2   ( pu  qi  bu2  bi2 )
2 2
min
p* , q* ,b*
( u ,i )K

- 46 -
Summarizing recent methods

 Recommendation is concerned with learning from noisy observations


(x, y), where f ( x)  yˆ

has to be determined such that


is minimal.
 (

ˆ
y  y ) 2

 A variety of different learning strategies have been applied trying to


estimate f(x)
– Non parametric neighborhood models
– MF models, SVMs, Neural Networks, Bayesian Networks,…

- 47 -
Collaborative Filtering Issues

 Pros:
– well-understood, works well in some domains, no knowledge engineering required

 Cons:
– requires user community, sparsity problems, no integration of other knowledge sources,
no explanation of results

 What is the best CF method?


– In which situation and which domain? Inconsistent findings; always the same domains
and data sets; differences between methods are often very small (1/100)

 How to evaluate the prediction quality?


– MAE / RMSE: What does an MAE of 0.7 actually mean?
– Serendipity: Not yet fully understood

 What about multi-dimensional ratings?

- 48 -
- 49 -
Recommender Systems in e-Commerce

 One Recommender Systems research question


– What should be in that list?

- 50 -
Recommender Systems in e-Commerce

 Another question both in research and practice


– How do we know that these are good
recommendations?

- 51 -
Recommender Systems in e-Commerce

 This might lead to …


– What is a good recommendation?
– What is a good recommendation strategy?
– What is a good recommendation strategy for my
business?

We hope
These youbeen
have will buy also for
in stock … quite a while now …

- 52 -
What is a good recommendation?

What are the measures in practice?

 Total sales numbers


 Promotion of certain items
 …
 Click-through-rates
 Interactivity on platform
 …
 Customer return rates
 Customer satisfaction and loyalty

- 53 -
Purpose and success criteria (1)

Different perspectives/aspects
– Depends on domain and purpose
– No holistic evaluation scenario exists

 Retrieval perspective
– Reduce search costs
– Provide "correct" proposals
– Assumption: Users know in advance what they want

 Recommendation perspective
– Serendipity – identify items from the Long Tail
– Users did not know about existence

- 54 -
When does a RS do its job well?

 "Recommend widely
unknown items that
users might actually
like!"

Recommend items
from the long tail  20% of items
accumulate 74% of all
positive ratings

- 55 -
Purpose and success criteria (2)

 Prediction perspective
– Predict to what degree users like an item
– Most popular evaluation scenario in research

 Interaction perspective
– Give users a "good feeling"
– Educate users about the product domain
– Convince/persuade users - explain

 Finally, conversion perspective


– Commercial situations
– Increase "hit", "clickthrough", "lookers to bookers" rates
– Optimize sales margins and profit

- 56 -
How do we as researchers
know?

 Test with real users


– A/B tests
– Example measures: sales increase, click through rates
 Laboratory studies
– Controlled experiments
– Example measures: satisfaction with the system (questionnaires)
 Offline experiments
– Based on historical data
– Example measures: prediction accuracy, coverage

- 57 -
Empirical research

 Characterizing dimensions:
– Who is the subject that is in the focus of research?
– What research methods are applied?
– In which setting does the research take place?

Subject Online customers, students, historical online


sessions, computers, …
Research method Experiments, quasi-experiments, non-experimental
research
Setting Lab, real-world scenarios

- 58 -
Research methods

 Experimental vs. non-experimental (observational) research methods


– Experiment (test, trial):
 "An experiment is a study in which at least one variable is manipulated and
units are randomly assigned to different levels or categories of manipulated
variable(s)."

 Units: users, historic sessions, …


 Manipulated variable: type of RS, groups of recommended items,
explanation strategies …
 Categories of manipulated variable(s): content-based RS, collaborative RS

- 59 -
Experiment designs

- 60 -
Evaluation in information retrieval (IR)

 Recommendation is viewed as information retrieval task:


– Retrieve (recommend) all items which are predicted to be "good" or
"relevant".
 Common protocol :
– Hide some items with known ground truth
– Rank items or predict ratings -> Count -> Cross-validate
 Ground truth established by human domain experts
Reality
Actually Good Actually Bad
Rated True Positive (tp) False Positive (fp)
Prediction

Good
Rated False Negative (fn) True Negative (tn)
Bad
- 61 -
Metrics: Precision and Recall

 Precision: a measure of exactness, determines the fraction of relevant


items retrieved out of all items retrieved
– E.g. the proportion of recommended movies that are actually good

 Recall: a measure of completeness, determines the fraction of relevant


items retrieved out of all relevant items
– E.g. the proportion of all good movies recommended

- 62 -
Dilemma of IR measures in RS

 IR measures are frequently applied, however:


 Ground truth for most items actually unknown
 What is a relevant item?
 Different ways of measuring precision possible
 Results from offline experimentation may have limited predictive power for
online user behavior.

- 63 -
Metrics: Rank Score – position matters

For a user:

Actually good Recommended


(predicted as good)
Item 237
hit Item 345
Item 899
Item 237
Item 187

 Rank Score extends recall and precision to take the positions of correct
items in a ranked list into account
– Particularly important in recommender systems as lower ranked items may be
overlooked by users
– Learning-to-rank: Optimize models for such measures (e.g., AUC)

- 64 -
Accuracy measures

 Datasets with items rated by users


– MovieLens datasets 100K-10M ratings
– Netflix 100M ratings
 Historic user ratings constitute ground truth
 Metrics measure error rate
– Mean Absolute Error (MAE) computes the deviation between
predicted ratings and actual ratings

– Root Mean Square Error (RMSE) is similar to MAE, but places


more emphasis on larger deviation

- 65 -
Offline experimentation example

 Netflix competition
– Web-based movie rental
– Prize of $1,000,000 for accuracy improvement (RMSE) of 10% compared to own
Cinematch system.

 Historical dataset
– ~480K users rated ~18K movies on a scale of 1 to 5 (~100M ratings)
– Last 9 ratings/user withheld
 Probe set – for teams for evaluation
 Quiz set – evaluates teams’ submissions for leaderboard
 Test set – used by Netflix to determine winner

 Today
– Rating prediction only seen as an additional input into the recommendation process

- 66 -
- 67 -
Content-based recommendation

 Collaborative filtering does NOT require any information about the items,
 However, it might be reasonable to exploit such information
 E.g. recommend fantasy novels to people who liked fantasy novels in the past

 What do we need:
 Some information about the available items such as the genre ("content")
 Some sort of user profile describing what the user likes (the preferences)

 The task:
 Learn user preferences
 Locate/recommend items that are "similar" to the user preferences

- 68 -
Paradigms of recommender systems

Content-based: "Show me more of the


same what I've liked"

- 69 -
What is the "content"?

 The genre is actually not part of the content of a book


 Most CB-recommendation methods originate from Information Retrieval
(IR) field:
– The item descriptions are usually automatically extracted (important words)
– Goal is to find and rank interesting text documents (news articles, web pages)

 Here:
– Classical IR-based methods based on keywords
– No expert recommendation knowledge involved
– User profile (preferences) are rather learned than explicitly elicited

- 70 -
Content representation and item similarities

 Simple approach
– Compute the similarity of an unseen item with the user profile based on the
keyword overlap (e.g. using the Dice coefficient)
2 ∗|𝑘𝑒𝑦𝑤𝑜𝑟𝑑𝑠 𝑏𝑖 ∩𝑘𝑒𝑦𝑤𝑜𝑟𝑑𝑠 𝑏𝑗 |
– sim(bi, bj) = 𝑘𝑒𝑦𝑤𝑜𝑟𝑑𝑠 𝑏𝑖 +|𝑘𝑒𝑦𝑤𝑜𝑟𝑑𝑠 𝑏𝑗 |

- 71 -
Term-Frequency - Inverse Document Frequency (TF-IDF)

 Simple keyword representation has its problems


– In particular when automatically extracted because
 Not every word has similar importance
 Longer documents have a higher chance to have an overlap with the user profile

 Standard measure: TF-IDF


– Encodes text documents as weighted term vector
– TF: Measures, how often a term appears (density in a document)
 Assuming that important terms appear more often
 Normalization has to be done in order to take document length into account
– IDF: Aims to reduce the weight of terms that appear in all documents

- 72 -
TF-IDF

 Compute the overall importance of keywords


– Given a keyword i and a document j
TF-IDF (i,j) = TF(i,j) * IDF(i)
 Term frequency (TF)
– Let freq(i,j) number of occurrences of keyword i in document j
– Let maxOthers(i,j) denote the highest number of occurrences of another
keyword of j
𝑓𝑟𝑒𝑞(𝑖,𝑗)
– 𝑇𝐹 𝑖, 𝑗 = 𝑚𝑎𝑥𝑂𝑡ℎ𝑒𝑟𝑠(𝑖,𝑗)

 Inverse Document Frequency (IDF)


– N: number of all recommendable documents
– n(i): number of documents in which keyword i appears
𝑁
– 𝐼𝐷𝐹(𝑖) = 𝑙𝑜𝑔 𝑛(𝑖)

- 73 -
Example TF-IDF representation

Figure taken from http://informationretrieval.org

- 74 -
More on the vector space model

 Vectors are usually long and sparse


 Improvements
– Remove stop words ("a", "the", ..)
– Use stemming
– Size cut-offs (only use top n most representative words, e.g. around 100)
– Use additional knowledge, use more elaborate methods for feature selection
– Detection of phrases as terms (such as United Nations)
 Limitations
– Semantic meaning remains unknown
– Example: usage of a word in a negative context
 "there is nothing on the menu that a vegetarian would like.."

 Usual similarity metric to compare vectors: Cosine similarity (angle)

- 75 -
Recommending items

 Simple method: nearest neighbors


– Given a set of documents D already rated by the user (like/dislike)
 Find the n nearest neighbors of a not-yet-seen item i in D
 Take these ratings to predict a rating/vote for i
 (Variations: neighborhood size, lower/upper similarity thresholds)

 Query-based retrieval: Rocchio's method


– The SMART System: Users are allowed to rate (relevant/irrelevant) retrieved
documents (feedback)
– The system then learns a prototype of relevant/irrelevant documents
– Queries are then automatically extended with additional terms/weight of
relevant documents

- 76 -
Rocchio details

 Document collections D+ and D-


 , ,  used to fine-tune
the feedback
 often only positive feedback
is used

- 77 -
Probabilistic methods

 Recommendation as classical text classification problem


– Long history of using probabilistic methods
 Simple approach:
 2 classes: like/dislike
 Simple Boolean document representation
 Calculate probability that document is liked/disliked based on Bayes theorem

Remember:
P(Label=1|X)=
k*P(X|Label=1) * P(Label=1)

- 78 -
Improvements

 Side note: Conditional independence of events does in fact not hold


– “New”/ “York“ and “Hong” / “Kong"
– Still, good accuracy can be achieved
 Boolean representation simplistic
– Keyword counts lost
 More elaborate probabilistic methods
– E.g. estimate probability of term v occurring in a document of class C by
relative frequency of v in all documents of the class
 Other linear classification algorithms (machine learning) can be used
– Support Vector Machines, ..

- 79 -
Limitations of content-based recommendation methods

 Keywords alone may not be sufficient to judge quality/relevance of a


document or web page
 Up-to-dateness, usability, aesthetics, writing style
 Content may also be limited / too short
 Content may not be automatically extractable (multimedia)

 Ramp-up phase required


 Some training data is still required
 Web 2.0: Use other sources to learn the user preferences

 Overspecialization
 Algorithms tend to propose "more of the same"
 E.g. too similar news items

- 80 -
- 81 -
Why do we need knowledge-based recommendation?

 Products with low number of available ratings

 Time span plays an important role


– Five-year-old ratings for computers
– User lifestyle or family situation changes
 Customers want to define their requirements explicitly
– “The color of the car should be black"

- 82 -
Knowledge-based recommendation

Knowledge-based: "Tell me what fits


based on my needs"

- 83 -
Knowledge-based recommendation I

 Explicit domain knowledge


– Sales knowledge elicitation from domain experts
– System mimics the behavior of experienced sales assistant
– Best-practice sales interactions
– Can guarantee “correct” recommendations (determinism) with respect to
expert knowledge

 Conversational interaction strategy


– Opposed to one-shot interaction
– Elicitation of user requirements
– Transfer of product knowledge (“educating users”)

- 84 -
Knowledge-Based Recommendation II

 Different views on “knowledge”

– Similarity functions
 Determine matching degree between query and item (case-based RS)

– Utility-based RS
 E.g. MAUT – Multi-attribute utility theory

– Logic-based knowledge descriptions (from domain expert)


 E.g. Hard and soft constraints

- 85 -
Constraint-based recommendation I

 A knowledge-based RS formulated as constraint satisfaction problem


CSP( X I  X U , D, SRS  KB  I )
 Def.
– XI, XU: Variables describing items and user model with domain D
(e.g. lower focal length, purpose)
– KB: Knowledge base comprising constraints and domain restrictions
(e.g. IF purpose=“on travel” THEN lower focal length < 28mm)
– SRS: Specific requirements of a user (e.g. purpose = “on travel”)
– I: Product catalog (e.g. (id=1 ˄ lfl = 28mm) ˅ (id=2 ˄ lfl= 35mm) ˅ …)
 Solution: Assignment tuple  assigning values to all variables XI
s.t. SRS  KB  I   is satisfiable.

- 86 -
Item ranking

 Multi-Attribute Utility Theory (MAUT)


– Each item is evaluated according to a predefined set of dimensions that provide
an aggregated view on the basic item properties
 E.g. quality and economy are dimensions in the domain of digital cameras

id value quality economy


price ≤250 5 10
>250 10 5
mpix ≤8 4 10
>8 10 6
opt-zoom ≤9 6 9
>9 10 6
... ... ... ...

- 87 -
Customer-specific item utilities with MAUT

 Customer interests: customer quality economy


Cu1 80% 20% *
Cu2 40% 60%
 Item utilities:
quality economy utility: cu1 utility: cu2
P1 Σ(5,4,6,6,3,7,10) = 41 Σ (10,10,9,10,10,10,6) = 65 45.8 [8] 55.4 [6]
P2 Σ(5,4,6,6,10,10,8) = 49 Σ (10,10,9,10,7,8,10) = 64 52.0 [7] 58.0 [1] **
P3 Σ(5,4,10,6,10,10,8) = 53 Σ (10,10,6,10,7,8,10) = 61 54.6 [5] 57.8 [2]
... ... ... ...

* **
- 88 -
Constraint-based recommendation II

 BUT: What if no solution exists?


– KB  I not satisfiable  debugging of knowledge base
– SRS  KB  I not satisfiable but
KB  I correct  debugging of user requirements

 Application of model-based diagnosis for debugging user


requirements
– Diagnoses: ( SRS \ )  KB  I is satisfiable

– Repairs: ( SRS \ )   repair  KB  I is satisfiable

– Conflict sets: CS  SRS : CS  KB  I not satisfiable

- 89 -
Example: find minimal relaxations (minimal diagnoses)

Knowledge Base: Product catalogue:

LHS RHS Powershot XY

C1 TRUE Brand = Brand pref. Brand Canon


C2 Motives = Landscape Low. foc. Length =< 28 Lower focal length 35
C3 TRUE Price =< Max. cost Upper focal length 140

Current user: Price 420 EUR

User model (SRS)


Lumix
Brand Panasonic
R1 Motives Landscape
CS1 Lower focal length 28
R2 Brand preference Canon
Upper focal length 112
CS2 R3 Max. cost 350 EUR
Price 319 EUR

Diagnoses: 1  {R 2},  2  {R1, R3}


- 90 -
Ask user

 Computation of minimal revisions of requirements

– Do you want to relax your brand preference?


 Accept Panasonic instead of Canon brand

– Or is photographing landscapes with a wide-angle lens and maximum cost less


important?
 Lower focal length > 28mm and Price > 350 EUR

– Optionally guided by some predefined weights or past community behavior

 Be aware of possible revisions (e.g. age, family status, …)

- 91 -
Constraint-based recommendation III

 More variants of recommendation task


– Customers maybe not know what they are seeking
– Find "diverse" sets of items
 Notion of similarity/dissimilarity
 Idea that users navigate a product space
 If recommendations are more diverse than users can navigate via critiques on
recommended "entry points" more efficiently (less steps of interaction)

– Bundling of recommendations
 Find item bundles that match together according to some knowledge
– E.g. travel packages, skin care treatments or financial portfolios
– RS for different item categories, CSP restricts configuring of bundles

- 92 -
Conversational strategies

 Process consisting of multiple


conversational moves
– Resembles natural sales interactions
– Not all user requirements known beforehand
– Customers are rarely satisfied with the initial
recommendations
 Different styles of preference elicitation:
– Free text query interface
– Asking technical/generic properties
– Images / inspiration
– Proposing and Critiquing

- 93 -
Example: adaptive strategy selection

 State model, different actions possible


– Propose item, ask user, relax/tighten result set,…

[Ricci et al., JITT, 2009]

- 94 -
Limitations of knowledge-based recommendation methods

 Cost of knowledge acquisition


– From domain experts
– From users
– Remedy: exploit web resources

 Accuracy of preference models


– Very fine granular preference models require many interaction cycles with the
user or sufficient detailed data about the user
– Remedy: use collaborative filtering, estimates the preference of a user
However: preference models may be instable
 E.g. asymmetric dominance effects and decoy items

- 95 -

You might also like