Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 16

Click to edit Master title style

Types of
Recommendation
Systems
1
Click
Theretoare
edit Master
mainly titletypes
three style of Recommendation Systems

1. Content-based filtering

2. Collaborative filtering

3. Hybrid recommendations

2 2
Click to edit
Pictorial Master title style
descriptions

3 3
Click to edit
Numerical Master title
examples style
of Content-based filtering

Example 1:A dataset is given in the following table-


Movie Genre Duration Rating

A Action 120 minutes 4.5

B Comedy 90 minutes 3.8

C Action 110 minutes 4.0


A user likes movie A. We can now calculate a similarity
score between
D the user’s
Drama liked movies and each remaining
150 minutes 4.2 ones
based on the features. Let’s use simple weighted sum approach to
assign weights to each feature and calculate the similarity score.

4 4
Weights(arbitrary):
Click to edit Master title style
1.Genre weight: 0.6
2.Duration weight: 0.3
3.Rating weight: 0.1
Similarity score (S) between the user’s preference and a movie (X) is calculated as follows:
S(X)=Genre weight×Genre similarity(X)+Duration weight×Duration similarity(X)+ Rating weight×Rating
similarity(X)
Now, let's calculate the similarity scores for the remaining movies:
1.Movie B: S(B)=0.6×0+0.3×(120−90)/120+0.1×(4.5−3.8)/4.5
S(B)≈0.175
2.Movie C: S(C)=0.6×1+0.3×(120−110)/120+0.1×(4.5−4.0)/4.5
S(C)≈0.694
3.Movie D:S(D)=0.6×0+0.3×(120−150)/120+0.1×(4.5−4.2)/4.5
S(D)≈−0.125
Now, based on the similarity scores ,we can recommend Movie C to the user,
As it has the highest similarity score.
5 5
Click to edit Master title style

Example 2:A dataset is given in the following table-


Product Feature 1 Feature 2 Feature 3 Feature 4
weight weight weight weight
Product 1 1 1 2
Product 2 1 4
Product 3 3 1
User Interest 2 1 1

User Interest Level = ∑piui (i=1 to 4)


Where pi is the product feature weight and ui is user interest value in
column i

6 6
Click to edit Master title style

User Interest Level for Product 1


= 2x1 + 0x0 + 1x1 + 1x2 = 5
User Interest Level for Product 2 = 2x0 + 0x1 + 1x4 + 1x0 = 4

User Interest Level for Product 3 = 2x3 + 0x0 + 1x0 + 1x1 = 7

The user’s interest level in product 3 is maximum, therefore the


system will recommend product 3 to the user.

7 7
Click to edit
Numerical Master title
example style
of Collaborative filtering

Movies Doctor Harry Harry Twilig The Iron Little Row


Users Strange Potter 2 Potter ht Notebo Man 2 Wome mean
3 ok n
A 4 5 1 10/3
Example
B 5
1: A dataset
5
is given the following table-
4 14/3

C 2 4 5 11/3

D 3 3 6/3

8 8
Click
Using to edit Master
Centered title style
cosine,
Ratings are normalized by subtracting row
Strange Potter mean-
Doctor Harry Harry Twilig The Iron Little
Movies 2 Potter ht Notebo Man 2 Women
Users 3 ok
A Here 2/3 the user’s ratings 5/3 -7/3are centered
B
around
1/3
zero.
1/3
The
-2/3
missing ratings are
treated
C
D
as Zero 0
also. Positive rating0 means
-5/3 1/3 4/3

the user likes the movie more than average


and negative rating means the user likes
the movie less than average.
9 9
Click to edit Master title style

Sim(A,B) = cos(rA,rB) =( rA.rB) /(|| rA ||.|| rB ||) = 0.09


Similarly sim(B,C) = 0
Now the prediction for user B to rate the movie Twilight
Will be [sim(A,B)*rating(Twilight)A
+sim(B,C)*rating(Twilight)C]/[sim(A,B)+sim(B,C)] =5/3

1010
Numerical example
Click to edit Masteroftitle
Hybrid
stylerecommendation

Example 1:A dataset with movie ratings from users are given by-
1. User A: • We also have movie features:
• Rated Movie X: 4.5 stars 1. Movie X:
• Rated Movie Y: 3.0 stars • Genre: Action
2. User B: • Duration: 120 minutes
• Rated Movie X: 3.0 stars • Rating: 4.0
• Rated Movie Y: 4.5 stars 2. Movie Y:
• Genre: Comedy
• Duration: 90 minutes
• Rating: 3.5
1111
Now this is the hybrid recommendation system that combines
Click to edit Master title style
collaborative filtering and content-based filtering-

Collaborative Filtering Predictions:


•Predicted rating for Movie X by User A: 4.2 stars (based on ratings from users similar to User A)
•Predicted rating for Movie Y by User A: 3.8 stars (based on ratings from users similar to User
Content-Based Filtering Predictions:
•Predicted rating for Movie X by User A: 4.5 stars (based on content similarity to movies User A liked)
•Predicted rating for Movie Y by User A: 3.2 stars (based on content similarity to movies User A liked)
Hybrid Recommendation (Weighted Average):
•Combine the predictions using weighted averages. For example, let’s assign a 70% weight to
collaborative filtering and a 30% weight to content-based filtering:
• Hybrid predicted rating for Movie X: 0.7×4.2+0.3×4.5=4.230.7×4.2+0.3×4.5=4.23 stars
• Hybrid predicted rating for Movie Y: 0.7×3.8+0.3×3.2=3.740.7×3.8+0.3×3.2=3.74 stars
Based on these hybrid predicted ratings, the system might recommend Movie X to User A since it has 1212
the higher predicted rating.
Click to edit Master title style

Example 2: Hybrid job recommendation system using the following dataset-

we have a collaborative filtering model


that predicts
Job1 user
Job2 preferences
Job3 Job4 based
Job5 on

their
User1
User2
historical
5
-
interactions
4
3
-
4
with
3
-
jobs-
-
5
User3 4 - 5 3 -
User4 - 5 - - 4

1313
Click to edit Master title style

Skills Industry Location


We'll User1
use the content-based
0.8
filtering 0.1
example from the
0.1
job
recommendations
User2
with
0.2
user profiles 0.6
and weights for0.2skills, industry, and
location:
User3 0.7 0.2 0.1
User4 0.5 0.3 0.2

1414
Click
HybridtoRecommendation:
edit Master title style

A weighted sum approach is used to combine the collaborative filtering and content-based filtering scores. Assuming CF_Weight
is 0.7 and CB_Weight is 0.3.
The hybrid scores for User1 and Job3 is calculated below-
Collaborative Filtering Score (CF_Score(User1, Job3)):
Since User1 has interactions with Job1 and Job4, we can predict User1's preference for Job3 based on similar
users who liked Job3. Let's say the collaborative filtering model predicts a score of 4.
Content-Based Filtering Score (CB_Score(User1, Job3)):
User1 liked jobs with a high skills weight. Job3 has a high skills value. Let's say the content-based filtering
model predicts a score of 0.8.
Hybrid score(User1, Job3) = 0.7*4 + 0.3*0.8 = 3.04
Therefore, the hybrid recommendation system suggests that User1 might like Job3 with a hybrid score of 3.04.
This combines collaborative and content-based filtering to provide a more personalized job recommendation.
Similar calculations can be done for other users and jobs in the recommendation system, and the weights can
be adjusted to achieve the desired balance between collaborative and content-based recommendations. 1515
Click to edit Master title style

End of Slides

16

You might also like