Introduction to Data Mining

Similar documents
Thanks to Jure Leskovec, Anand Rajaraman, Jeff Ullman

Mining of Massive Datasets Jure Leskovec, Anand Rajaraman, Jeff Ullman Stanford University Infinite data. Filtering data streams

CS246: Mining Massive Datasets Jure Leskovec, Stanford University

BBS654 Data Mining. Pinar Duygulu

CS246: Mining Massive Datasets Jure Leskovec, Stanford University

CS246: Mining Massive Datasets Jure Leskovec, Stanford University

CS 124/LINGUIST 180 From Languages to Information

CS 124/LINGUIST 180 From Languages to Information

CS 124/LINGUIST 180 From Languages to Information

Mining of Massive Datasets Jure Leskovec, Anand Rajaraman, Jeff Ullman Stanford University

CS 5614: (Big) Data Management Systems. B. Aditya Prakash Lecture #16: Recommenda2on Systems

Recommendation and Advertising. Shannon Quinn (with thanks to J. Leskovec, A. Rajaraman, and J. Ullman of Stanford University)

CS246: Mining Massive Datasets Jure Leskovec, Stanford University

Recommendation Algorithms: Collaborative Filtering. CSE 6111 Presentation Advanced Algorithms Fall Presented by: Farzana Yasmeen

COMP 465: Data Mining Recommender Systems

Recommender Systems. Collaborative Filtering & Content-Based Recommending

Real-time Recommendations on Spark. Jan Neumann, Sridhar Alla (Comcast Labs) DC Spark Interactive Meetup East May

Recommender Systems - Content, Collaborative, Hybrid

Recommendation Systems

Data Mining Lecture 2: Recommender Systems

Knowledge Discovery and Data Mining 1 (VO) ( )

Recommender Systems - Introduction. Data Mining Lecture 2: Recommender Systems

Recommender System. What is it? How to build it? Challenges. R package: recommenderlab

CS 345A Data Mining Lecture 1. Introduction to Web Mining

CS246: Mining Massive Datasets Jure Leskovec, Stanford University

Recommender Systems New Approaches with Netflix Dataset

COMP6237 Data Mining Making Recommendations. Jonathon Hare

Recommender Systems. Techniques of AI

Recommender Systems 6CCS3WSN-7CCSMWAL

Use of KNN for the Netflix Prize Ted Hong, Dimitris Tsamis Stanford University

Performance Comparison of Algorithms for Movie Rating Estimation

Using Social Networks to Improve Movie Rating Predictions

Mining Web Data. Lijun Zhang

Machine Learning using MapReduce

Web Personalization & Recommender Systems

Data Mining Techniques

CS246: Mining Massive Datasets Jure Leskovec, Stanford University

Neighborhood-Based Collaborative Filtering

Part 11: Collaborative Filtering. Francesco Ricci

CPSC 340: Machine Learning and Data Mining. Recommender Systems Fall 2017

Web Personalization & Recommender Systems

Hybrid Recommendation System Using Clustering and Collaborative Filtering

Data Mining Techniques

Mining Web Data. Lijun Zhang

Part 11: Collaborative Filtering. Francesco Ricci

Towards a hybrid approach to Netflix Challenge

Machine Learning and Data Mining. Collaborative Filtering & Recommender Systems. Kalev Kask

CS249: ADVANCED DATA MINING

Recommender Systems. Nivio Ziviani. Junho de Departamento de Ciência da Computação da UFMG

Movie Recommender System - Hybrid Filtering Approach

CS246: Mining Massive Datasets Jure Leskovec, Stanford University

Property1 Property2. by Elvir Sabic. Recommender Systems Seminar Prof. Dr. Ulf Brefeld TU Darmstadt, WS 2013/14

A probabilistic model to resolve diversity-accuracy challenge of recommendation systems

Part 12: Advanced Topics in Collaborative Filtering. Francesco Ricci

CSE 258 Lecture 8. Web Mining and Recommender Systems. Extensions of latent-factor models, (and more on the Netflix prize)

Distributed Itembased Collaborative Filtering with Apache Mahout. Sebastian Schelter twitter.com/sscdotopen. 7.

Recommendation System for Netflix

Recommender Systems (RSs)

CSE 158 Lecture 8. Web Mining and Recommender Systems. Extensions of latent-factor models, (and more on the Netflix prize)

Diversity in Recommender Systems Week 2: The Problems. Toni Mikkola, Andy Valjakka, Heng Gui, Wilson Poon

Collaborative Filtering and Recommender Systems. Definitions. .. Spring 2009 CSC 466: Knowledge Discovery from Data Alexander Dekhtyar..

arxiv: v4 [cs.ir] 28 Jul 2016

Collaborative Filtering using Euclidean Distance in Recommendation Engine

Recommender Systems: Practical Aspects, Case Studies. Radek Pelánek

Document Clustering: Comparison of Similarity Measures

Feature selection. LING 572 Fei Xia

Introduction to Data Mining

Text Analytics (Text Mining)

The influence of social filtering in recommender systems

CS435 Introduction to Big Data Spring 2018 Colorado State University. 3/21/2018 Week 10-B Sangmi Lee Pallickara. FAQs. Collaborative filtering

Text Analytics (Text Mining)

CS224W Project: Recommendation System Models in Product Rating Predictions

Instructor: Stefan Savev

A Genetic Algorithm Approach to Recommender. System Cold Start Problem. Sanjeevan Sivapalan. Bachelor of Science, Ryerson University, 2011.

Jeff Howbert Introduction to Machine Learning Winter

CS 229 Final Project - Using machine learning to enhance a collaborative filtering recommendation system for Yelp

Recommender Systems. Master in Computer Engineering Sapienza University of Rome. Carlos Castillo

Recap: Project and Practicum CS276B. Recommendation Systems. Plan for Today. Sample Applications. What do RSs achieve? Given a set of users and items

Using Data Mining to Determine User-Specific Movie Ratings

General Instructions. Questions

Near Neighbor Search in High Dimensional Data (1) Dr. Anwar Alhenshiri

Personalize Movie Recommendation System CS 229 Project Final Writeup

vector space retrieval many slides courtesy James Amherst

COLLABORATIVE LOCATION AND ACTIVITY RECOMMENDATIONS WITH GPS HISTORY DATA

Recommender System Optimization through Collaborative Filtering

A comprehensive survey of neighborhood-based recommendation methods

Recommender Systems: User Experience and System Issues

Weighted Alternating Least Squares (WALS) for Movie Recommendations) Drew Hodun SCPD. Abstract

A PROPOSED HYBRID BOOK RECOMMENDER SYSTEM

Community-Based Recommendations: a Solution to the Cold Start Problem

Orange3 Data Fusion Documentation. Biolab

Collaborative filtering models for recommendations systems

CSE 547: Machine Learning for Big Data Spring Problem Set 2. Please read the homework submission policies.

Web Personalisation and Recommender Systems

Master Project. Various Aspects of Recommender Systems. Prof. Dr. Georg Lausen Dr. Michael Färber Anas Alzoghbi Victor Anthony Arrascue Ayala

CS246: Mining Massive Datasets Jure Leskovec, Stanford University

Review on Techniques of Collaborative Tagging

Sparse Estimation of Movie Preferences via Constrained Optimization

The Principle and Improvement of the Algorithm of Matrix Factorization Model based on ALS

Personalized News Recommender using Twitter

Transcription:

Introduction to Data Mining Lecture #7: Recommendation Content based & Collaborative Filtering Seoul National University

In This Lecture Understand the motivation and the problem of recommendation Compare the content-based vs. collaborative filtering approaches for recommender system Learn how to evaluate methods for recommendation

Outline Overview Content-based Recommender System Collaborative Filtering Evaluation & Complexity

Example: Recommender Systems Customer X Buys Metallica CD Buys Megadeth CD Customer Y Does search on Metallica Recommender system suggests Megadeth from data collected about customer X

Recommendations Examples: Search Recommendations Items Products, web sites, blogs, news items,

Offline vs. Online Recommendation Offline recommendation: popular item Wall-mart: shelf space contains only popular items Also: TV networks, movie theaters, Web enables near-zero-cost dissemination of information about products Can recommend scarce items, too More choice necessitates better filters Recommendation engines How Into Thin Air (998) made Touching the Void (988) a bestseller: http://www.wired.com/wired/archive/.0/tail.html 6

Sidenote: The Long Tail Source: Chris Anderson (00) 7

Types of Recommendations Editorial and hand curated List of favorite cities List of essential items for travel Simple aggregates Top 0, Most Popular, Recent Uploads Tailored to individual users Amazon, Netflix, 8

Formal Model X = set of Customers S = set of Items Utility function u: X S R R = set of ratings R is a totally ordered set e.g., 0- stars, real number in [0,] 9

Utility Matrix Avatar LOTR Matrix Pirates Alice 0. Bob 0. 0. Carol 0. David 0. 0

Key Problems () Gathering known ratings for matrix How to collect the data in the utility matrix () Extrapolate unknown ratings from the known ones Mainly interested in high unknown ratings We are not interested in knowing what you don t like but what you like () Evaluating extrapolation methods How to measure success/performance of recommendation methods

() Gathering Ratings Explicit Ask people to rate items Doesn t work well in practice people can t be bothered Implicit Learn ratings from user actions E.g., purchase implies high rating What about low ratings? not buying an item = don t like the item?

() Extrapolating Utilities Key problem: Utility matrix U is sparse Most people have not rated most items Cold start: New items have no ratings New users have no history Three approaches to recommender systems: ) Content-based ) Collaborative ) Latent factor based

Outline Overview Content-based Recommender System Collaborative Filtering Evaluation & Complexity

Content-based Recommendations Main idea: Recommend items to customer x similar to previous items rated highly by x Andy enjoyed watching Avengers. Andy will also like Captain America Civil War as well since they are similar in content Example: Movie recommendations Recommend movies with same actor(s), genre, Websites, blogs, news Recommend other sites with similar content

Plan of Action likes Item profiles recommend build match Red Circles Triangles User profile 6

Item Profiles For each item, create an item profile Profile is a set (vector) of features Movies: author, title, actor, Text: Set of important words in document How to pick important features? Usual heuristic from text mining is TF-IDF (Term frequency * Inverse Doc Frequency) Term Feature Document Item 7

Sidenote: TF-IDF f ij = frequency of term (feature) i in doc (item) j n i = number of docs that mention term i N = total number of docs Note: we normalize TF to discount for longer documents TF-IDF score: w ij = TF ij IDF i Doc profile = set of words with highest TF-IDF scores, together with their scores 8

User Profiles and Prediction User profile possibilities: Weighted average of rated item profiles Variation: weight by difference from average rating for item Prediction heuristic: Given user profile x and item profile i, estimate uu(xx, ii) = cos(xx, ii) = xx ii xx ii 9

Pros: Content-based Approach +: No need for data on other users No cold-start or sparsity problems +: Able to recommend to users with unique tastes +: Able to recommend new & unpopular items No first-rater problem +: Able to provide explanations Can provide explanations of recommended items by listing content-features that caused an item to be recommended 0

Cons: Content-based Approach : Finding the appropriate features is hard E.g., images, movies, music : Recommendations for new users How to build a user profile? : Overspecialization Never recommends items outside user s content profile People might have multiple interests Unable to exploit quality judgments of other users

Outline Overview Content-based Recommender System Collaborative Filtering Evaluation & Complexity

Consider user x Collaborative Filtering Find set N of other users whose ratings are similar to x s ratings Estimate x s ratings based on ratings of users in N x N Note that contents of items are not used here.

Finding Similar Users Let r x be the vector of user x s ratings Jaccard similarity measure Problem: Ignores the value of the rating Cosine similarity measure sim(x, y) = cos(r x, r y ) = rr xx rr yy rr xx rr yy Problem: low rating is not penalized much Pearson correlation coefficient S xy = items rated by both users x and y r x = [*, _, _, *, ***] r y = [*, _, **, **, _] r x, r y as sets: r x = {,, } r y = {,, } r x, r y as points: r x = {, 0, 0,, } r y = {, 0,,, 0} ssssss xx, yy = ss SSxxxx rr xxxx rr xx rr yyss rr yy ss SSxxxx rr xxxx rr xx ss SSxxxx rr yyss rr yy r x, r y avg. rating of x, y

Similarity Metric Cosine sim: ssssss(xx, yy) = ii rr xxii rr yyii ii rr xxxx ii rr yyii Intuitively we want: sim(a, B) > sim(a, C) Jaccard similarity: / < / Cosine similarity: 0.86 > 0. Problem: low rating is not penalized much Solution: subtract the (row) mean sim A,B vs. A,C: 0.09 > -0.9

Rating Predictions From similarity metric to recommendations: Let r x be the vector of user x s ratings Let N (called k-nearest neighbors ) be the set of k users most similar to x who have rated item i Prediction rr xxxx for item i of user x: rr xxxx = kk yy NN rr yyyy Shorthand: ss xxxx = ssssss xx, yy rr xxxx = yy NN ss xxxx rr yyyy yy NN ss xxxx Many other tricks possible 6

Item-Item Collaborative Filtering So far: User-user collaborative filtering Another view: Item-item For item i, find other similar items rated by user x Use the utility matrix for computing similarity Estimate rating for item i based on ratings for similar items Can use same similarity metrics and prediction functions as in user-user model r xi = j N ( i; x) s ij j N ( i; x) s r ij xj s ij similarity of items i and j r xj rating of user x on item j N(i;x) set items rated by x similar to i 7

8 Item-Item CF ( N =) 0 9 8 7 6 6 users movies - unknown rating - rating between to

9 Item-Item CF ( N =) 0 9 8 7 6? 6 users - estimate rating of movie by user movies

Item-Item CF ( N =) users? 6 7 8 9 0 sim(,m).00-0.8 movies 0. -0.0-0. 6 0.9 Neighbor selection: Identify movies similar to movie, rated by user Similarity computation: ) Subtract mean rating m i from each movie i m = (++++)/ =.6 row : [-.6, 0, -0.6, 0, 0,., 0, 0,., 0, 0., 0] ) Compute cosine similarities between rows 0

Item-Item CF ( N =) users? 6 7 8 9 0 sim(,m).00-0.8 movies 0. -0.0-0. 6 0.9 Compute similarity weights: s, =0., s,6 =0.9

Item-Item CF ( N =) users 6 7 8 9 0.6 movies 6 Predict by taking weighted average: r. = (0.* + 0.9*) / (0.+0.9) =.6 rr iiii = jj NN(ii;xx) ss iiii rr jjjj ss iiii

CF: Common Practice Before: r xi = j N ( i; x) s j N ( i; x) ij s r ij xj Define similarity s ij of items i and j Select k nearest neighbors N(i; x) Items most similar to i, that were rated by x Estimate rating r xi as the weighted average: r xi = b xi + j N ( i; x) ( r j N ( i; x) μ = overall mean movie rating baseline estimate for r xi b x = rating deviation of user x bb xxxx = μμ + bb xx + bb ii s ij xj s ij b xj ) = (avg. rating of user x) μ b i = rating deviation of movie i = (avg. rating of movie i) μ

CF: Baseline Predictor Mean movie rating:.7 stars The Sixth Sense is 0. stars above avg. Joe rates 0. stars below avg. Baseline estimation: Joe will rate The Sixth Sense stars

Item-Item vs. User-User Avatar LOTR Matrix Pirates Alice 0.8 Bob 0. 0. Carol 0.9 0.8 David 0. In practice, it has been observed that item-item often works better than user-user Why? Items are simpler, users have multiple tastes

Pros/Cons of Collaborative Filtering + Works for any kind of item No feature selection needed - Cold Start: Needs enough users in the system to find a match - Sparsity: The user/ratings matrix is sparse Hard to find users that have rated the same items - First rater: Cannot recommend an item that has not been previously rated (e.g., new items, esoteric items) - Popularity bias: Cannot recommend items to someone with unique taste Tends to recommend popular items 6

Hybrid Methods Implement two or more different recommenders and combine predictions Perhaps using a linear model Add content-based methods to collaborative filtering Item profiles for new item problem Item-item CF: one cannot find similar items to the new item Demographics to deal with new user problem User-user CF: cannot find similar users to the new user 7

Outline Overview Content-based Recommender System Collaborative Filtering Evaluation & Complexity 8

Evaluation movies users 9

Evaluation users movies????? Test Data Set 0

Evaluating Predictions Compare predictions with known ratings Root-mean-square error (RMSE) xxxx rr xxxx rr xxxx where rr xxxx is predicted, rr xxxx is the true rating of x on i Precision at top 0: error in top 0 highest predictions Rank Correlation: Spearman s correlation between system s and user s complete rankings (From Wikipedia) Pearson correlation coefficient Rank correlation coefficient=

Problems with Error Measures Narrow focus on accuracy sometimes misses the point E.g., Prediction diversity In practice, we care only to predict high ratings: RMSE might penalize a method that does well for high ratings and badly for others

Collaborative Filtering: Complexity Expensive step is finding k most similar customers: O( X ) X set of customers Too expensive to do at runtime Could pre-compute Pre-compute finding similar customers Near-neighbor search in high dimensions (LSH) Clustering Dimensionality reduction (later)

Tip: Add Data Simple method on large data is better than complex method on small data Leverage all the data Don t try to reduce data size in an effort to make fancy algorithms work Add more data e.g., add IMDB data on genres More data beats better algorithms http://anand.typepad.com/datawocky/008/0/more-data-usual.html

What You Need to Know Motivation and the problem of recommendation Compare the content-based vs. collaborative filtering approaches for recommender system Content-based: less cold-start problem Collaborative filtering: works for any item Evaluation methods for recommendation Training set and test set

Questions? 6