SlideShare una empresa de Scribd logo
1 de 20
Class Outline 
• Introduction: Recommendation System 
• Collaborative Filtering 
– Calculating Similarities 
– Recommending Items 
• Content-based Recommendation 
• Collaborative Filtering in R: Beer 
Recommendation based on Beer Advocate
Recommendation System Demo 
http://blog.yhathq.com/posts/recommender-system-in-r.html
Examples 
• Retail: Amazon 
• Movie: Netflix 
• Friends: Facebook 
• Professional connection: LinkedIn 
• Websites: Reddit
Key Ideas 
• Intuition: Low tech way to get recommendation - ask your friends! 
– Some of your friends have better “taste” than others (likely-minded) 
• Problem: Not scalable 
– As more and more options become available, it become less practical to 
decide what you want by asking a small group of people 
– They may not be aware of all the options 
• Solution: Collaborative filtering or KNN 
– Search a large group of people and find a smaller set with tastes similar to 
yours 
– Looks at other things they like an combines them to create a ranked list of 
suggestions 
– First used by David Goldberg (Xerox PARC, 1992): “Using collaborative filtering 
to weave an information tapestry.”
Input Data 
• Explicit (Questioning) 
– Explicit rating (1 -5 numerical ratings) 
– Favorites (Likes): 1 (liked), 0 (No vote), -1 (disliked) 
• Implicit (Behavioral) 
– Purchase: 1 (bought), 0 (didn’t buy) 
– Clicks: 1 (clicked), 0 (didn’t click) 
– Reads: 1 (read), 0 (didn’t read) 
– Watching a Video: 1 (watched), 0 (didn’t watch) 
– Hybrid: 2 (bought), 1 (browsed), 0 (didn’t buy)
Recommendation vs. Prediction 
• Recommendations 
– Suggestions 
– Top-N 
• Predictions 
– Ratings 
– Purchase
Preference Data: Structure 
• Rows: Customers/Users 
• Columns: Items 
Customer ID Lady in 
the 
Water 
• Large matrix Y(u,i) 
Snake 
on a 
Plane 
Just My 
Luck 
Superman 
Returns 
– Many zeros (Sparse) 
– Number of users: large (order of million) 
– Number of observations per customer: large (200 +) 
– Time/sequence information ignored 
You, Me, 
and 
Dupree 
The Night 
Listener 
Michael 2.5 3.5 3.0 3.5 2.5 3.0 
Jay 3.5 3.5 3.0 
July 3.5 3.0 4.0 2.5 4.5 
Peter 3.0 4.0 2.0 3.0 3.0 
Stephen 3.0 4.0 5.0 3.0
Collaborative Filtering Tasks 
• 1. Finding Similar Users: Calculating Similarities 
• 2. Ranking the Users 
• 3. Recommending Items based on weighted preference data
Finding Similar Users 
• Calculate pair-wise similarities 
– Euclidean Distance: Simple, but subject to rating inflation 
– Cosine similarity: better with binary/fractional data 
– Pearson correlation: continuous variables (e.g. numerical ratings) 
– Others: Jaccard coefficient, Manhattan distance
Ranking the Users 
• Focal customer 
– Toby: Preference Vector (“Snakes on a Plan”: 4.5, “You, Me, and Dupree: 1.0”, 
“Superman Returns”: 4.0) 
Customer ID Pearson Correlation Similarity 
Michael 0.99 
Jay 0.38 
July 0.89 
Peter 0.92 
Stephen 0.66 
– Top 3 matches: Michael, Peter, July -> Likely-minded!
Recommending Items – 1/2 
• Problems: If we only use top 1 likely-minded customer 
– May accidently turn up customers who haven’t reviewed some of the movies 
that I might like 
– Could return a customer who strangely liked a move that got bad reviews from 
all other customers 
• Solution: Score the items by producing a weighted score that ranks 
the customers (weights by similarity)
Recommending Items – 2/2 
Customer 
ID 
Similarity Lady in 
the 
Water 
Snake 
on a 
Plane 
Just 
My 
Luck 
Superm 
an 
Returns 
You, Me, 
and Dupree 
The Night 
Listener 
Michael 0.99 2.5 3.5 3.0 3.5 2.5 3.0 
Jay 0.38 3.5 3.5 3.0 
July 0.89 3.5 3.0 4.0 2.5 4.5 
Peter 0.92 3.0 4.0 2.0 3.0 3.0 
Stephen 0.66 3.0 4.0 5.0 3.0 
Total 8.5 18.5 8 15.5 8.5 16.5 
Sim. Sum 2.57 3.84 2.8 3.46 2.26 3.84 
Total/Sim. 
3.31 4.82 2.86 4.48 3.76 4.30 
Sum 
1 2 3
Problems with Collaborative Filtering 
• When data are sparse, correlations (weights) are based on very 
few common items -> unreliable 
• It cannot handle new items 
• It do not incorporate attribute information 
• Alternative way: content-based recommendations 
– Let’s use attribute information!
Content-based Recommendations 
• 1. Defined features and feature values (similar to conjoint analysis) 
• 2. Describe each item as a vector of features 
• 3. Develop a user profile: the types of items this user likes 
– A weighted vector of item attributes 
– Weights denote the importance of each attribute to the user 
• 4. Recommend items that are similar to those that a user liked in the 
past 
• Note 1: Similar to information retrieval (text mining) 
• Note 2: Pre-computation possible; More scalable -> Used by Amazon
More ideas for improvement 
• Ensemble methods (combining algorithms) 
– Most advanced/commercial algorithms combine kNN, matrix 
factorization (handling large/sparse matrix), and other classifiers 
• Marginal propensity to buy with/without recommendation 
(instead of probability of buy) 
– Anand Bodapati (JMR 2008): “Customers who buy this product buy these 
other products” kind of recommendation system frequently 
recommends what customers would have bought anyway and the 
recommendation system often creates only purchase acceleration rather 
than expand sales 
• Incorporate text reviews: text review data can be used as a basis 
to calculate similarities (i.e. text mining) 
– Basic methods only rely on numerical ratings/purchase data
• Collaborative Filtering in R: Beer 
Recommender from “Beer Advocate” Data
Beer Advocate Data 
• Each Record: a beer’s name, brewery, metadata (style, ABV), 
(numerical) ratings (1-5), short text reviews (250 – 5000 characters) 
• ~1.5 millions reviews posted on Beer Advocate from 1999 to 
2011.
Collaborative Filtering in R – 1/2 
Step 0) Install “R” and Packages 
R program: http://www.r-project.org/ 
Package: http://cran.r-project.org/web/packages/tm/index.html 
Package: http://cran.r-project.org/web/packages/twitteR/index.html 
Package: http://cran.r-project.org/web/packages/wordcloud/index.html 
Manual: http://cran.r-project.org/web/packages/tm/vignettes/tm.pdf 
Step 1) Collecting preference data (ratings) from 
“Beer Advocate” : Web crawling
Recommendation System in R – 2/2 
Step 2) Cleaning/Formatting Data (Python) 
Step 3) Importing Data into R 
Step 4) Finding Similar Users: Calculating 
Similarities 
Step 5) Ranking the Users 
Step 6) Recommending Items
Books 
• Programming Collective Intelligence (Toby Segaran) 
• Machine Learning for Hackers (Drew Conway and John 
Myles White) 
Articles (more technical) 
• Internet Recommendation Systems (Asim Ansari, 
Skander Essegaier, Rajeev Kohli) 
• Recommendation Systems with Purchase Data (Anand 
Bodapati) 
Reference

Más contenido relacionado

La actualidad más candente

Recommendation engines
Recommendation enginesRecommendation engines
Recommendation engines
Georgian Micsa
 
Recommender system algorithm and architecture
Recommender system algorithm and architectureRecommender system algorithm and architecture
Recommender system algorithm and architecture
Liang Xiang
 
Matrix Factorization Techniques For Recommender Systems
Matrix Factorization Techniques For Recommender SystemsMatrix Factorization Techniques For Recommender Systems
Matrix Factorization Techniques For Recommender Systems
Lei Guo
 
Building a Recommendation Engine - An example of a product recommendation engine
Building a Recommendation Engine - An example of a product recommendation engineBuilding a Recommendation Engine - An example of a product recommendation engine
Building a Recommendation Engine - An example of a product recommendation engine
NYC Predictive Analytics
 

La actualidad más candente (20)

Recommendation system
Recommendation systemRecommendation system
Recommendation system
 
Recommender systems: Content-based and collaborative filtering
Recommender systems: Content-based and collaborative filteringRecommender systems: Content-based and collaborative filtering
Recommender systems: Content-based and collaborative filtering
 
An introduction to Recommender Systems
An introduction to Recommender SystemsAn introduction to Recommender Systems
An introduction to Recommender Systems
 
Recsys 2016 tutorial: Lessons learned from building real-life recommender sys...
Recsys 2016 tutorial: Lessons learned from building real-life recommender sys...Recsys 2016 tutorial: Lessons learned from building real-life recommender sys...
Recsys 2016 tutorial: Lessons learned from building real-life recommender sys...
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender Systems
 
Past, present, and future of Recommender Systems: an industry perspective
Past, present, and future of Recommender Systems: an industry perspectivePast, present, and future of Recommender Systems: an industry perspective
Past, present, and future of Recommender Systems: an industry perspective
 
Recommendation Systems
Recommendation SystemsRecommendation Systems
Recommendation Systems
 
Recommendation engines
Recommendation enginesRecommendation engines
Recommendation engines
 
Recommendation System
Recommendation SystemRecommendation System
Recommendation System
 
Movie lens movie recommendation system
Movie lens movie recommendation systemMovie lens movie recommendation system
Movie lens movie recommendation system
 
Content based recommendation systems
Content based recommendation systemsContent based recommendation systems
Content based recommendation systems
 
Collaborative Filtering using KNN
Collaborative Filtering using KNNCollaborative Filtering using KNN
Collaborative Filtering using KNN
 
Recommender system algorithm and architecture
Recommender system algorithm and architectureRecommender system algorithm and architecture
Recommender system algorithm and architecture
 
Recommender systems for E-commerce
Recommender systems for E-commerceRecommender systems for E-commerce
Recommender systems for E-commerce
 
Recommendation Systems Basics
Recommendation Systems BasicsRecommendation Systems Basics
Recommendation Systems Basics
 
Matrix Factorization Techniques For Recommender Systems
Matrix Factorization Techniques For Recommender SystemsMatrix Factorization Techniques For Recommender Systems
Matrix Factorization Techniques For Recommender Systems
 
Collaborative Filtering 1: User-based CF
Collaborative Filtering 1: User-based CFCollaborative Filtering 1: User-based CF
Collaborative Filtering 1: User-based CF
 
Building a Recommendation Engine - An example of a product recommendation engine
Building a Recommendation Engine - An example of a product recommendation engineBuilding a Recommendation Engine - An example of a product recommendation engine
Building a Recommendation Engine - An example of a product recommendation engine
 
HT2014 Tutorial: Evaluating Recommender Systems - Ensuring Replicability of E...
HT2014 Tutorial: Evaluating Recommender Systems - Ensuring Replicability of E...HT2014 Tutorial: Evaluating Recommender Systems - Ensuring Replicability of E...
HT2014 Tutorial: Evaluating Recommender Systems - Ensuring Replicability of E...
 
Recommendation system (1).pptx
Recommendation system (1).pptxRecommendation system (1).pptx
Recommendation system (1).pptx
 

Destacado

Destacado (20)

Marketing Experiment - Part II: Analysis
Marketing Experiment - Part II: Analysis Marketing Experiment - Part II: Analysis
Marketing Experiment - Part II: Analysis
 
Promotion Analytics in Consumer Electronics - Module 1: Data
Promotion Analytics in Consumer Electronics - Module 1: DataPromotion Analytics in Consumer Electronics - Module 1: Data
Promotion Analytics in Consumer Electronics - Module 1: Data
 
Promotion Analytics - Module 2: Model and Estimation
Promotion Analytics - Module 2: Model and EstimationPromotion Analytics - Module 2: Model and Estimation
Promotion Analytics - Module 2: Model and Estimation
 
Dcm
DcmDcm
Dcm
 
Marketing Analytics Tools & Techniques
Marketing Analytics Tools & TechniquesMarketing Analytics Tools & Techniques
Marketing Analytics Tools & Techniques
 
Personal Matching Recommendation system in TinderBox
Personal Matching Recommendation system in TinderBoxPersonal Matching Recommendation system in TinderBox
Personal Matching Recommendation system in TinderBox
 
"Knowledge Enabled Real-Time Recommendation System", by Jules Chevalier and S...
"Knowledge Enabled Real-Time Recommendation System", by Jules Chevalier and S..."Knowledge Enabled Real-Time Recommendation System", by Jules Chevalier and S...
"Knowledge Enabled Real-Time Recommendation System", by Jules Chevalier and S...
 
User behavior modelling & recommendation system based on social networks
User behavior modelling & recommendation system based on social networksUser behavior modelling & recommendation system based on social networks
User behavior modelling & recommendation system based on social networks
 
Toward Building a Content based Video Recommendation System Based on Low-leve...
Toward Building a Content based Video Recommendation System Based on Low-leve...Toward Building a Content based Video Recommendation System Based on Low-leve...
Toward Building a Content based Video Recommendation System Based on Low-leve...
 
Marketing Experimentation - Part I
Marketing Experimentation - Part IMarketing Experimentation - Part I
Marketing Experimentation - Part I
 
Developing and Movie Recommendation System in R
Developing and Movie Recommendation System in RDeveloping and Movie Recommendation System in R
Developing and Movie Recommendation System in R
 
A Hybrid Recommendation system
A Hybrid Recommendation systemA Hybrid Recommendation system
A Hybrid Recommendation system
 
Dummy Variable Regression Analysis
Dummy Variable Regression AnalysisDummy Variable Regression Analysis
Dummy Variable Regression Analysis
 
Introduction to behavior based recommendation system
Introduction to behavior based recommendation systemIntroduction to behavior based recommendation system
Introduction to behavior based recommendation system
 
Conjoint Analysis Part 3/3 - Market Simulator
Conjoint Analysis Part 3/3 - Market SimulatorConjoint Analysis Part 3/3 - Market Simulator
Conjoint Analysis Part 3/3 - Market Simulator
 
Recommendation System --Theory and Practice
Recommendation System --Theory and PracticeRecommendation System --Theory and Practice
Recommendation System --Theory and Practice
 
Conjoint Analysis - Part 1/3
Conjoint Analysis - Part 1/3Conjoint Analysis - Part 1/3
Conjoint Analysis - Part 1/3
 
Conjoint Analysis - Part 2/3
Conjoint Analysis - Part 2/3Conjoint Analysis - Part 2/3
Conjoint Analysis - Part 2/3
 
Multiple Regression Analysis
Multiple Regression AnalysisMultiple Regression Analysis
Multiple Regression Analysis
 
Measuring the Effectiveness of the Promotional Program
Measuring the Effectiveness of the Promotional ProgramMeasuring the Effectiveness of the Promotional Program
Measuring the Effectiveness of the Promotional Program
 

Similar a Introduction to Recommendation System

Data Mining and Recommendation Systems
Data Mining and Recommendation SystemsData Mining and Recommendation Systems
Data Mining and Recommendation Systems
Salil Navgire
 
recommendationsystem-140410131156-phpapp01 (1).pdf
recommendationsystem-140410131156-phpapp01 (1).pdfrecommendationsystem-140410131156-phpapp01 (1).pdf
recommendationsystem-140410131156-phpapp01 (1).pdf
ssuserff0096
 
Merchandising-at-eBay-SearchMeetup-2012
Merchandising-at-eBay-SearchMeetup-2012Merchandising-at-eBay-SearchMeetup-2012
Merchandising-at-eBay-SearchMeetup-2012
Venkat Sundaranatha
 

Similar a Introduction to Recommendation System (20)

Big data certification training mumbai
Big data certification training mumbaiBig data certification training mumbai
Big data certification training mumbai
 
Best data science courses in pune
Best data science courses in puneBest data science courses in pune
Best data science courses in pune
 
Top data science institutes in hyderabad
Top data science institutes in hyderabadTop data science institutes in hyderabad
Top data science institutes in hyderabad
 
best online data science courses
best online data science coursesbest online data science courses
best online data science courses
 
Lecture Notes on Recommender System Introduction
Lecture Notes on Recommender System IntroductionLecture Notes on Recommender System Introduction
Lecture Notes on Recommender System Introduction
 
Overview of recommender system
Overview of recommender systemOverview of recommender system
Overview of recommender system
 
Fashiondatasc
FashiondatascFashiondatasc
Fashiondatasc
 
Recommender lecture
Recommender lectureRecommender lecture
Recommender lecture
 
Demystifying Recommendation Systems
Demystifying Recommendation SystemsDemystifying Recommendation Systems
Demystifying Recommendation Systems
 
recommendation system techunique and issue
recommendation system techunique and issuerecommendation system techunique and issue
recommendation system techunique and issue
 
Recommendation Systems Roadtrip
Recommendation Systems RoadtripRecommendation Systems Roadtrip
Recommendation Systems Roadtrip
 
Recommender Systems in a nutshell
Recommender Systems in a nutshellRecommender Systems in a nutshell
Recommender Systems in a nutshell
 
Lec7 collaborative filtering
Lec7 collaborative filteringLec7 collaborative filtering
Lec7 collaborative filtering
 
Data Mining and Recommendation Systems
Data Mining and Recommendation SystemsData Mining and Recommendation Systems
Data Mining and Recommendation Systems
 
Recommender systems
Recommender systemsRecommender systems
Recommender systems
 
A recommendation engine for your php application
A recommendation engine for your php applicationA recommendation engine for your php application
A recommendation engine for your php application
 
Recommendation system
Recommendation system Recommendation system
Recommendation system
 
recommendationsystem-140410131156-phpapp01 (1).pdf
recommendationsystem-140410131156-phpapp01 (1).pdfrecommendationsystem-140410131156-phpapp01 (1).pdf
recommendationsystem-140410131156-phpapp01 (1).pdf
 
Merchandising-at-eBay-SearchMeetup-2012
Merchandising-at-eBay-SearchMeetup-2012Merchandising-at-eBay-SearchMeetup-2012
Merchandising-at-eBay-SearchMeetup-2012
 
Олександр Обєдніков “Рекомендательные системы”
Олександр Обєдніков “Рекомендательные системы”Олександр Обєдніков “Рекомендательные системы”
Олександр Обєдніков “Рекомендательные системы”
 

Último

Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 
Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...
Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...
Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...
amitlee9823
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
Matteo Carbone
 
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
amitlee9823
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 

Último (20)

Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
 
Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...
Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...
Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors Data
 
Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 May
 
John Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfJohn Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdf
 
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Phases of negotiation .pptx
 Phases of negotiation .pptx Phases of negotiation .pptx
Phases of negotiation .pptx
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptx
 
Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...
Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...
Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...
 

Introduction to Recommendation System

  • 1. Class Outline • Introduction: Recommendation System • Collaborative Filtering – Calculating Similarities – Recommending Items • Content-based Recommendation • Collaborative Filtering in R: Beer Recommendation based on Beer Advocate
  • 2. Recommendation System Demo http://blog.yhathq.com/posts/recommender-system-in-r.html
  • 3. Examples • Retail: Amazon • Movie: Netflix • Friends: Facebook • Professional connection: LinkedIn • Websites: Reddit
  • 4. Key Ideas • Intuition: Low tech way to get recommendation - ask your friends! – Some of your friends have better “taste” than others (likely-minded) • Problem: Not scalable – As more and more options become available, it become less practical to decide what you want by asking a small group of people – They may not be aware of all the options • Solution: Collaborative filtering or KNN – Search a large group of people and find a smaller set with tastes similar to yours – Looks at other things they like an combines them to create a ranked list of suggestions – First used by David Goldberg (Xerox PARC, 1992): “Using collaborative filtering to weave an information tapestry.”
  • 5. Input Data • Explicit (Questioning) – Explicit rating (1 -5 numerical ratings) – Favorites (Likes): 1 (liked), 0 (No vote), -1 (disliked) • Implicit (Behavioral) – Purchase: 1 (bought), 0 (didn’t buy) – Clicks: 1 (clicked), 0 (didn’t click) – Reads: 1 (read), 0 (didn’t read) – Watching a Video: 1 (watched), 0 (didn’t watch) – Hybrid: 2 (bought), 1 (browsed), 0 (didn’t buy)
  • 6. Recommendation vs. Prediction • Recommendations – Suggestions – Top-N • Predictions – Ratings – Purchase
  • 7. Preference Data: Structure • Rows: Customers/Users • Columns: Items Customer ID Lady in the Water • Large matrix Y(u,i) Snake on a Plane Just My Luck Superman Returns – Many zeros (Sparse) – Number of users: large (order of million) – Number of observations per customer: large (200 +) – Time/sequence information ignored You, Me, and Dupree The Night Listener Michael 2.5 3.5 3.0 3.5 2.5 3.0 Jay 3.5 3.5 3.0 July 3.5 3.0 4.0 2.5 4.5 Peter 3.0 4.0 2.0 3.0 3.0 Stephen 3.0 4.0 5.0 3.0
  • 8. Collaborative Filtering Tasks • 1. Finding Similar Users: Calculating Similarities • 2. Ranking the Users • 3. Recommending Items based on weighted preference data
  • 9. Finding Similar Users • Calculate pair-wise similarities – Euclidean Distance: Simple, but subject to rating inflation – Cosine similarity: better with binary/fractional data – Pearson correlation: continuous variables (e.g. numerical ratings) – Others: Jaccard coefficient, Manhattan distance
  • 10. Ranking the Users • Focal customer – Toby: Preference Vector (“Snakes on a Plan”: 4.5, “You, Me, and Dupree: 1.0”, “Superman Returns”: 4.0) Customer ID Pearson Correlation Similarity Michael 0.99 Jay 0.38 July 0.89 Peter 0.92 Stephen 0.66 – Top 3 matches: Michael, Peter, July -> Likely-minded!
  • 11. Recommending Items – 1/2 • Problems: If we only use top 1 likely-minded customer – May accidently turn up customers who haven’t reviewed some of the movies that I might like – Could return a customer who strangely liked a move that got bad reviews from all other customers • Solution: Score the items by producing a weighted score that ranks the customers (weights by similarity)
  • 12. Recommending Items – 2/2 Customer ID Similarity Lady in the Water Snake on a Plane Just My Luck Superm an Returns You, Me, and Dupree The Night Listener Michael 0.99 2.5 3.5 3.0 3.5 2.5 3.0 Jay 0.38 3.5 3.5 3.0 July 0.89 3.5 3.0 4.0 2.5 4.5 Peter 0.92 3.0 4.0 2.0 3.0 3.0 Stephen 0.66 3.0 4.0 5.0 3.0 Total 8.5 18.5 8 15.5 8.5 16.5 Sim. Sum 2.57 3.84 2.8 3.46 2.26 3.84 Total/Sim. 3.31 4.82 2.86 4.48 3.76 4.30 Sum 1 2 3
  • 13. Problems with Collaborative Filtering • When data are sparse, correlations (weights) are based on very few common items -> unreliable • It cannot handle new items • It do not incorporate attribute information • Alternative way: content-based recommendations – Let’s use attribute information!
  • 14. Content-based Recommendations • 1. Defined features and feature values (similar to conjoint analysis) • 2. Describe each item as a vector of features • 3. Develop a user profile: the types of items this user likes – A weighted vector of item attributes – Weights denote the importance of each attribute to the user • 4. Recommend items that are similar to those that a user liked in the past • Note 1: Similar to information retrieval (text mining) • Note 2: Pre-computation possible; More scalable -> Used by Amazon
  • 15. More ideas for improvement • Ensemble methods (combining algorithms) – Most advanced/commercial algorithms combine kNN, matrix factorization (handling large/sparse matrix), and other classifiers • Marginal propensity to buy with/without recommendation (instead of probability of buy) – Anand Bodapati (JMR 2008): “Customers who buy this product buy these other products” kind of recommendation system frequently recommends what customers would have bought anyway and the recommendation system often creates only purchase acceleration rather than expand sales • Incorporate text reviews: text review data can be used as a basis to calculate similarities (i.e. text mining) – Basic methods only rely on numerical ratings/purchase data
  • 16. • Collaborative Filtering in R: Beer Recommender from “Beer Advocate” Data
  • 17. Beer Advocate Data • Each Record: a beer’s name, brewery, metadata (style, ABV), (numerical) ratings (1-5), short text reviews (250 – 5000 characters) • ~1.5 millions reviews posted on Beer Advocate from 1999 to 2011.
  • 18. Collaborative Filtering in R – 1/2 Step 0) Install “R” and Packages R program: http://www.r-project.org/ Package: http://cran.r-project.org/web/packages/tm/index.html Package: http://cran.r-project.org/web/packages/twitteR/index.html Package: http://cran.r-project.org/web/packages/wordcloud/index.html Manual: http://cran.r-project.org/web/packages/tm/vignettes/tm.pdf Step 1) Collecting preference data (ratings) from “Beer Advocate” : Web crawling
  • 19. Recommendation System in R – 2/2 Step 2) Cleaning/Formatting Data (Python) Step 3) Importing Data into R Step 4) Finding Similar Users: Calculating Similarities Step 5) Ranking the Users Step 6) Recommending Items
  • 20. Books • Programming Collective Intelligence (Toby Segaran) • Machine Learning for Hackers (Drew Conway and John Myles White) Articles (more technical) • Internet Recommendation Systems (Asim Ansari, Skander Essegaier, Rajeev Kohli) • Recommendation Systems with Purchase Data (Anand Bodapati) Reference