collaborative filtering

21
Collaborative Filtering is a technique used by some recommender systems NCKU-hpds TienYang

Upload: tien-yang-wu

Post on 14-Jul-2015

284 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Collaborative filtering

Collaborative Filteringis a technique used by some recommender systems

NCKU-hpds TienYang

Page 2: Collaborative filtering

E-Commerce

Collaborative filtering is a method of making automatic predictions (filtering) about the interests of a user by collecting preferences or taste information from many users (collaborating). from wiki

Page 3: Collaborative filtering

when we choose one book,amazon will recommend other book we maybe like

Page 4: Collaborative filtering

how amazon know what I like?

Page 5: Collaborative filtering

1. Weight all users with respect to similarity with active user

2. Select a subset of users to use as a set of predictors

3. Compute a prediction from a weighted combination of selected neighbors’ ratings

Page 6: Collaborative filtering

1. Weight all users with respect to similarity with active user

simple compute

Nathan [5,1,5]

Joe [5,2,5]John [2,5,2.5]

Al [2,2,4]

use cosine compute similarity

cos (Nathan,Joe) 0.99cos (Nathan,John) 0.64cos (Nathan,Al) 0.91

Page 7: Collaborative filtering

1. Weight all users with respect to similarity with active user

2. Select a subset of users to use as a set of predictors

if there are hundreds of user, we can choose the higher similarity

choose n of m(sum of user is m)

Page 8: Collaborative filtering

1. Weight all users with respect to similarity with active user

cos (Nathan,Joe) 0.99cos (Nathan,John) 0.64cos (Nathan,Al) 0.91 ? = 3.03

2. Select a subset of users to use as a set of predictors

3. Compute a prediction from a weighted combination of selected neighbors’ ratings

(0.99*4+0.64*3+0.91*2) (0.99+0.64+0.91)

0.990.64

0.91

Page 9: Collaborative filtering

✤ User-Based CF ✤ Item-Based CF

compute similarity base on user

compute similarity base on item

Page 10: Collaborative filtering

✤ User-Based CF

compute similarity base on user

if predict user A to item4 rating

user B to item4 rating is 5

user F to item4 rating is 1 user A to item4 =

5 * similarities (user A, user B) + 1 * similarities (user A, user F)

similarities (user A, user B) + similarities (user A, user F)

Page 11: Collaborative filtering

✤ Item-Based CF

compute similarity base on item

if predict user A to item4 rating

user A to item2 rating is 1

user A to item3 rating is 2 user A to item4 =

1 * similarities (item2, item4) + 2 * similarities (item3, item4)

similarities (item2, item4) + similarities (item3, item4)

Page 12: Collaborative filtering

similarity!?

Cosine Similarity

Pearson Correlation Similarity

how about

?

(1,-1)

Page 13: Collaborative filtering

j

Covariance

Pearson Correlation Similarity(1,-1)

Page 14: Collaborative filtering

apple milk toast

sam 2 0 4

john 5 5 3

tim 2 4 ?

u

i j

Ri = (2+5)/2 Rj = (4+3)/2

Pearson Correlation Similarity

Page 15: Collaborative filtering

what is different between

?Pearson Correlation SimilarityCosine Similarity

AWS:lower user bias!

Page 16: Collaborative filtering

what is different between

Pearson Correlation Similarity

Cosine Similarity Adjusted Cosine Similarity

advanced

average user rating

average item rating

Page 17: Collaborative filtering

apple milk toast

sam 2 0 4

john 5 5 3

tim 2 4 ?

u

ij

2 * similarities (apple, toast) + 4 * similarities (milk, toast)

similarities (apple, toast) + similarities (milk, toast)

? =

Page 18: Collaborative filtering

so1. Weight all items with respect to similarity with active items

2. Select a subset of items to use as a set of predictors

3. Compute a prediction from a weighted combination of selected neighbors’ ratings

choose n of m(sum of user is m)

Page 19: Collaborative filtering

Collaborative Filtering problem ?

Cold-start

Sparsity

Scalability

ALS-Alternating Least Squares

SVD-singular value decomposition

Hybrid Recommendation Systems

Scaling-Up Item-Based Collaborative Filtering Recommendation Algorithm Based on Hadoop

Page 20: Collaborative filtering

Collaborative Filtering Gist

Collaborative Filtering ipynb online

Scaling-up Item-based Collaborative Filtering Recommendation Algorithm based on Hadoop PPT

code and PPT

Page 21: Collaborative filtering

referenceItem-based collaborative filtering Algorithm

Collaborative filtering wiki

Pearson correlation coefficient wiki

協同過濾法 (collaborative Filtering) 及相關概念