SlideShare a Scribd company logo
Cegeka AI/ML Competence Center




  Recommendation
  engines
  Theory and intro to




                                 Georgian Micsa
Georgian Micsa
●   Software engineer with 6+ years of experience, mainly Java but also
    JavaScript and .NET
●   Interested on OOD, architecture and agile software development
    methodologies
●   Currently working as Senior Java Developer @ Cegeka
●   georgian.micsa@gmail.com
●   http://ro.linkedin.com/in/georgianmicsa
What is it?
●   Recommender/recommendation system/engine/platform
●   A subclass of information filtering system
●   Predict the 'rating' or 'preference' that a user would give to a new item
    (music, books, movies, people or groups etc)
●   Can use a model built from the characteristics of an item (content-based
    approaches)
●   Can use the user's social environment (collaborative filtering approaches)
Examples

●   Amazon.com
    ○   Recommend additional books
    ○   Frequently bought together books
    ○   Implemented using a sparse matrix of book cooccurrences
●   Pandora Radio
    ○   Plays music with similar characteristics
    ○   Content based filtering based on properties of song/artist
    ○   Based also on user's feedback
    ○   Users emphasize or deemphasize certain characteristics
Examples 2

●   Last.fm
    ○   Collaborative filtering
    ○   Recommends songs by observing the tracks played by user and
        comparing to behaviour of other users
    ○   Suggests songs played by users with similar interests
●   Netflix
    ○   Predictions of movies
    ○   Hybrid approach
    ○   Collaborative filtering based on user`s previous ratings and watching
        behaviours (compared to other users)
    ○   Content based filtering based on characteristics of movies
Collaborative filtering
●   Collect and analyze a large amount of information on users’ behaviors,
    activities or preferences
●   Predict what users will like based on their similarity to other users
●   It does not rely on the content of the items
●   Measures user similarity or item similarity
●   Many algorithms:
    ○   the k-nearest neighborhood (k-NN)
    ○   the Pearson Correlation
    ○   etc.
Collaborative filtering 2
●   Build a model from user's profile collecting explicit and implicit data
●   Explicit data:
    ○   Asking a user to rate an item on a sliding scale.
    ○   Rank a collection of items from favorite to least favorite.
    ○   Presenting two items to a user and asking him/her to choose the
        better one of them.
    ○   Asking a user to create a list of items that he/she likes.
●   Implicit data:
    ○   Observing the items that a user views in an online store.
    ○   Analyzing item/user viewing times
    ○   Keeping a record of the items that a user purchases online.
    ○   Obtaining a list of items that a user has listened to or watched
    ○   Analyzing the user's social network and discovering similar likes and
        dislikes
Collaborative filtering 3
●   Collaborative filtering approaches often suffer from three problems:
    ○   Cold Start: needs a large amount of existing data on a user in order
        to make accurate recommendations
    ○   Scalability: a large amount of computation power is often necessary
        to calculate recommendations.
    ○   Sparsity: The number of items sold on major e-commerce sites is
        extremely large. The most active users will only have rated a small
        subset of the overall database. Thus, even the most popular items
        have very few ratings.
Content-based filtering
●   Based on information about and characteristics of the items
●   Try to recommend items that are similar to those that a user liked in the
    past (or is examining in the present)
●   Use an item profile (a set of discrete attributes and features)
●   Content-based profile of users based on a weighted vector of item
    features
●   The weights denote the importance of each feature to the user
●   To compute the weights:
    ○   average values of the rated item vector
    ○   Bayesian Classifiers, cluster analysis, decision trees, and artificial
        neural networks
Content-based filtering 2
●   Can collect feedback from user to assign higher or lower weights on the
    importance of certain attributes
●   Cross-content recommendation: music, videos, products, discussions etc.
    from different services can be recommended based on news browsing.
●   Popular for movie recommendations: Internet Movie Database, See This
    Next etc.
Hybrid Recommender Systems
●   Combines collaborative filtering and content-based filtering
●   Implemented in several ways:
    ○   by making content-based and collaborative-based predictions
        separately and then combining them
    ○   by adding content-based capabilities to a collaborative-based
        approach (and vice versa)
    ○   by unifying the approaches into one model
●   Studies have shown that hybrid methods can provide more accurate
    recommendations than pure approaches
●   Overcome cold start and the sparsity problems
●   Netflix and See This Next
What is Apache Mahout?
●   A scalable Machine Learning library
●   Apache License
●   Scalable to reasonably large datasets (core algorithms implemented in
    Map/Reduce, runnable on Hadoop)
●   Distributed and non-distributed algorithms
●   Community
●   Usecases
    •   Clustering (group items that are topically related)
    •   Classification (learn to assign categories to documents)
    •   Frequent Itemset Mining (find items that appear together)
    •   Recommendation Mining (find items a user might like)
Non-distributed recommenders
●   Non-distributed, non Hadoop, collaborative recommender algorithms
●   Java or external server which exposes recommendation logic to your
    application via web services and HTTP
●   Key interfaces:
    ○   DataModel: CSV files or database
    ○   UserSimilarity: computes similarity between users
    ○   ItemSimilarity: computes similarity between items
    ○   UserNeighborhood: used for similarity of users
    ○   Recommender: produces recommendations
●   Different implementations based on your needs
●   Input in this format: UserId,ItemId,[Preference or Rating]
●   Preference is not needed in case of associations (pages viewed by users)
User-based recommender example
DataModel model = new FileDataModel(new File("data.txt"));

UserSimilarity userSimilarity = new PearsonCorrelationSimilarity(model);
// Optional:
userSimilarity.setPreferenceInferrer(new AveragingPreferenceInferrer());

UserNeighborhood neighborhood =
         new NearestNUserNeighborhood(3, userSimilarity, model);
Recommender recommender =
    new GenericUserBasedRecommender(model, neighborhood, userSimilarity);

Recommender cachingRecommender = new CachingRecommender(recommender);

List<RecommendedItem> recommendations =
         cachingRecommender.recommend(1234, 10);
Item-based recommender example
DataModel model = new FileDataModel(new File("data.txt"));
// Construct the list of pre-computed correlations
Collection<GenericItemSimilarity.ItemItemSimilarity> correlations = ...;
ItemSimilarity itemSimilarity = new GenericItemSimilarity(correlations);

Recommender recommender =
     new GenericItemBasedRecommender(model, itemSimilarity);

Recommender cachingRecommender = new CachingRecommender(recommender);

List<RecommendedItem> recommendations =
       cachingRecommender.recommend(1234, 10);
Recommender evaluation
For preference data models:
DataModel myModel = ...;
RecommenderBuilder builder = new RecommenderBuilder() {
     public Recommender buildRecommender(DataModel model) {
       // build and return the Recommender to evaluate here
     }
};
RecommenderEvaluator evaluator =
     new AverageAbsoluteDifferenceRecommenderEvaluator();

double evaluation = evaluator.evaluate(builder, myModel, 0.9, 1.0);


For boolean data models, precision and recall can be computed.
Distributed Item Based
●   Mahout offers 2 Hadoop Map/Reduce jobs aimed to support Itembased
    Collaborative Filtering
●   org.apache.mahout.cf.taste.hadoop.similarity.item.ItemSimilarityJob
    ○   computes all similar items
    ○   input is a CSV file with theformat userID,itemID,value
    ○   output is a file of itemIDs with their associated similarity value
    ○   different configuration options: eg. similarity measure to use (co
        occurrence, Euclidian distance, Pearson correlation, etc.)
●   org.apache.mahout.cf.taste.hadoop.item.RecommenderJob
    ○   Completely distributed itembased recommender
    ○   input is a CSV file with the format userID,itemID,value
    ○   output is a file of userIDs with associated recommended itemIDs and
        their scores
    ○   also configuration options
Mahout tips
●   Start with non-distributed recommenders
●   100M user-item associations can be handled by a modern server with 4GB
    of heap available as a real-time recommender
●   Over this scale distributed algorithms make sense
●   Data can be sampled, noisy and old data can be pruned
●   Ratings: GenericItemBasedRecommender and
    PearsonCorrelationSimilarity
●   Preferences: GenericBooleanPrefItemBasedRecommender and
    LogLikelihoodSimilarity
●   Content-based item-item similarity => your own ItemSimilarity
Mahout tips 2
●   CSV files
    ○   FileDataModel
    ○   push new files periodically
●   Database
    ○   XXXJDBCDataModel
    ○   ReloadFromJDBCDataModel
●   Offline or live recommendations?
    ○   Distributed algorithms => Offline periodical computations
    ○   Data is pushed periodically as CSV files or in DB
    ○   SlopeOneRecommender deals with updates quickly
    ○   Real time update of the DataModel and refresh recommander after
        some events (user rates an item etc.)
References

●   http://en.wikipedia.org/wiki/Recommender_system
●   https://cwiki.apache.org/confluence/display/MAHOUT/Mahout+Wiki
●   http://www.ibm.com/developerworks/java/library/j-mahout/
●   http://www.slideshare.net/sscdotopen/mahoutcf
●   http://www.philippeadjiman.com/blog/2009/11/11/flexible-
    collaborative-filtering-in-java-with-mahout-taste/

More Related Content

What's hot

An introduction to Recommender Systems
An introduction to Recommender SystemsAn introduction to Recommender Systems
An introduction to Recommender Systems
David Zibriczky
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender Systems
Carlos Castillo (ChaTo)
 
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
Xavier Amatriain
 
Collaborative Filtering using KNN
Collaborative Filtering using KNNCollaborative Filtering using KNN
Collaborative Filtering using KNN
Şeyda Hatipoğlu
 
How to build a recommender system?
How to build a recommender system?How to build a recommender system?
How to build a recommender system?
blueace
 
Context-aware Recommendation: A Quick View
Context-aware Recommendation: A Quick ViewContext-aware Recommendation: A Quick View
Context-aware Recommendation: A Quick View
YONG ZHENG
 
Recommendation System Explained
Recommendation System ExplainedRecommendation System Explained
Recommendation System Explained
Crossing Minds
 
Boston ML - Architecting Recommender Systems
Boston ML - Architecting Recommender SystemsBoston ML - Architecting Recommender Systems
Boston ML - Architecting Recommender Systems
James Kirk
 
Deep Learning for Recommender Systems
Deep Learning for Recommender SystemsDeep Learning for Recommender Systems
Deep Learning for Recommender Systems
Justin Basilico
 
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
 
Recommender system algorithm and architecture
Recommender system algorithm and architectureRecommender system algorithm and architecture
Recommender system algorithm and architecture
Liang Xiang
 
Recommender Systems - A Review and Recent Research Trends
Recommender Systems  -  A Review and Recent Research TrendsRecommender Systems  -  A Review and Recent Research Trends
Recommender Systems - A Review and Recent Research Trends
Sujoy Bag
 
Recent advances in deep recommender systems
Recent advances in deep recommender systemsRecent advances in deep recommender systems
Recent advances in deep recommender systems
NAVER Engineering
 
Calibrated Recommendations
Calibrated RecommendationsCalibrated Recommendations
Calibrated Recommendations
Harald Steck
 
Recommender Systems In Industry
Recommender Systems In IndustryRecommender Systems In Industry
Recommender Systems In Industry
Xavier Amatriain
 
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
Viet-Trung TRAN
 
Recommendation Engine Project Presentation
Recommendation Engine Project PresentationRecommendation Engine Project Presentation
Recommendation Engine Project Presentation
19Divya
 
Overview of recommender system
Overview of recommender systemOverview of recommender system
Overview of recommender system
Stanley Wang
 
Recommender Systems: Advances in Collaborative Filtering
Recommender Systems: Advances in Collaborative FilteringRecommender Systems: Advances in Collaborative Filtering
Recommender Systems: Advances in Collaborative Filtering
Changsung Moon
 
Recommender systems for E-commerce
Recommender systems for E-commerceRecommender systems for E-commerce
Recommender systems for E-commerce
Alexander Konduforov
 

What's hot (20)

An introduction to Recommender Systems
An introduction to Recommender SystemsAn introduction to Recommender Systems
An introduction to Recommender Systems
 
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
 
Collaborative Filtering using KNN
Collaborative Filtering using KNNCollaborative Filtering using KNN
Collaborative Filtering using KNN
 
How to build a recommender system?
How to build a recommender system?How to build a recommender system?
How to build a recommender system?
 
Context-aware Recommendation: A Quick View
Context-aware Recommendation: A Quick ViewContext-aware Recommendation: A Quick View
Context-aware Recommendation: A Quick View
 
Recommendation System Explained
Recommendation System ExplainedRecommendation System Explained
Recommendation System Explained
 
Boston ML - Architecting Recommender Systems
Boston ML - Architecting Recommender SystemsBoston ML - Architecting Recommender Systems
Boston ML - Architecting Recommender Systems
 
Deep Learning for Recommender Systems
Deep Learning for Recommender SystemsDeep Learning for Recommender Systems
Deep Learning for Recommender Systems
 
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
 
Recommender system algorithm and architecture
Recommender system algorithm and architectureRecommender system algorithm and architecture
Recommender system algorithm and architecture
 
Recommender Systems - A Review and Recent Research Trends
Recommender Systems  -  A Review and Recent Research TrendsRecommender Systems  -  A Review and Recent Research Trends
Recommender Systems - A Review and Recent Research Trends
 
Recent advances in deep recommender systems
Recent advances in deep recommender systemsRecent advances in deep recommender systems
Recent advances in deep recommender systems
 
Calibrated Recommendations
Calibrated RecommendationsCalibrated Recommendations
Calibrated Recommendations
 
Recommender Systems In Industry
Recommender Systems In IndustryRecommender Systems In Industry
Recommender Systems In Industry
 
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
 
Recommendation Engine Project Presentation
Recommendation Engine Project PresentationRecommendation Engine Project Presentation
Recommendation Engine Project Presentation
 
Overview of recommender system
Overview of recommender systemOverview of recommender system
Overview of recommender system
 
Recommender Systems: Advances in Collaborative Filtering
Recommender Systems: Advances in Collaborative FilteringRecommender Systems: Advances in Collaborative Filtering
Recommender Systems: Advances in Collaborative Filtering
 
Recommender systems for E-commerce
Recommender systems for E-commerceRecommender systems for E-commerce
Recommender systems for E-commerce
 

Viewers also liked

A content based movie recommender system for mobile application
A content based movie recommender system for mobile applicationA content based movie recommender system for mobile application
A content based movie recommender system for mobile application
Arafat X
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender Systems
Federico Cargnelutti
 
Movie Recommendation engine
Movie Recommendation engineMovie Recommendation engine
Movie Recommendation engine
Jayesh Lahori
 
Business Intelligence Services
Business Intelligence ServicesBusiness Intelligence Services
Business Intelligence Services
Rachid Mouchaouche
 
Project Progress Report - Recommender Systems for Social Networks
Project Progress Report - Recommender Systems for Social NetworksProject Progress Report - Recommender Systems for Social Networks
Project Progress Report - Recommender Systems for Social Networks
amirhhz
 
Book Recommendation System using Data Mining for the University of Hong Kong ...
Book Recommendation System using Data Mining for the University of Hong Kong ...Book Recommendation System using Data Mining for the University of Hong Kong ...
Book Recommendation System using Data Mining for the University of Hong Kong ...
CITE
 
Collaborative filtering
Collaborative filteringCollaborative filtering
Collaborative filtering
Tien-Yang (Aiden) Wu
 
Business use of Social Media and Impact on Enterprise Architecture
Business use of Social Media and Impact on Enterprise ArchitectureBusiness use of Social Media and Impact on Enterprise Architecture
Business use of Social Media and Impact on Enterprise Architecture
NUS-ISS
 
Recommender Systems in E-Commerce
Recommender Systems in E-CommerceRecommender Systems in E-Commerce
Recommender Systems in E-Commerce
Roger Chen
 
Collaborative Filtering and Recommender Systems By Navisro Analytics
Collaborative Filtering and Recommender Systems By Navisro AnalyticsCollaborative Filtering and Recommender Systems By Navisro Analytics
Collaborative Filtering and Recommender Systems By Navisro Analytics
Navisro Analytics
 
Recommendation at Netflix Scale
Recommendation at Netflix ScaleRecommendation at Netflix Scale
Recommendation at Netflix Scale
Justin Basilico
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender Systems
T212
 
Summary, Conclusions and Recommendations
Summary, Conclusions and RecommendationsSummary, Conclusions and Recommendations
Summary, Conclusions and Recommendations
Roqui Malijan
 
Buidling large scale recommendation engine
Buidling large scale recommendation engineBuidling large scale recommendation engine
Buidling large scale recommendation engine
Keeyong Han
 
Collaborative Filtering Recommendation System
Collaborative Filtering Recommendation SystemCollaborative Filtering Recommendation System
Collaborative Filtering Recommendation System
Milind Gokhale
 
Recommendation system
Recommendation system Recommendation system
Recommendation system
Vikrant Arya
 
Recommender Systems (Machine Learning Summer School 2014 @ CMU)
Recommender Systems (Machine Learning Summer School 2014 @ CMU)Recommender Systems (Machine Learning Summer School 2014 @ CMU)
Recommender Systems (Machine Learning Summer School 2014 @ CMU)
Xavier Amatriain
 
Report Writing - Conclusions & Recommendations sections
Report Writing - Conclusions & Recommendations sectionsReport Writing - Conclusions & Recommendations sections
Report Writing - Conclusions & Recommendations sections
Sherrie Lee
 

Viewers also liked (18)

A content based movie recommender system for mobile application
A content based movie recommender system for mobile applicationA content based movie recommender system for mobile application
A content based movie recommender system for mobile application
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender Systems
 
Movie Recommendation engine
Movie Recommendation engineMovie Recommendation engine
Movie Recommendation engine
 
Business Intelligence Services
Business Intelligence ServicesBusiness Intelligence Services
Business Intelligence Services
 
Project Progress Report - Recommender Systems for Social Networks
Project Progress Report - Recommender Systems for Social NetworksProject Progress Report - Recommender Systems for Social Networks
Project Progress Report - Recommender Systems for Social Networks
 
Book Recommendation System using Data Mining for the University of Hong Kong ...
Book Recommendation System using Data Mining for the University of Hong Kong ...Book Recommendation System using Data Mining for the University of Hong Kong ...
Book Recommendation System using Data Mining for the University of Hong Kong ...
 
Collaborative filtering
Collaborative filteringCollaborative filtering
Collaborative filtering
 
Business use of Social Media and Impact on Enterprise Architecture
Business use of Social Media and Impact on Enterprise ArchitectureBusiness use of Social Media and Impact on Enterprise Architecture
Business use of Social Media and Impact on Enterprise Architecture
 
Recommender Systems in E-Commerce
Recommender Systems in E-CommerceRecommender Systems in E-Commerce
Recommender Systems in E-Commerce
 
Collaborative Filtering and Recommender Systems By Navisro Analytics
Collaborative Filtering and Recommender Systems By Navisro AnalyticsCollaborative Filtering and Recommender Systems By Navisro Analytics
Collaborative Filtering and Recommender Systems By Navisro Analytics
 
Recommendation at Netflix Scale
Recommendation at Netflix ScaleRecommendation at Netflix Scale
Recommendation at Netflix Scale
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender Systems
 
Summary, Conclusions and Recommendations
Summary, Conclusions and RecommendationsSummary, Conclusions and Recommendations
Summary, Conclusions and Recommendations
 
Buidling large scale recommendation engine
Buidling large scale recommendation engineBuidling large scale recommendation engine
Buidling large scale recommendation engine
 
Collaborative Filtering Recommendation System
Collaborative Filtering Recommendation SystemCollaborative Filtering Recommendation System
Collaborative Filtering Recommendation System
 
Recommendation system
Recommendation system Recommendation system
Recommendation system
 
Recommender Systems (Machine Learning Summer School 2014 @ CMU)
Recommender Systems (Machine Learning Summer School 2014 @ CMU)Recommender Systems (Machine Learning Summer School 2014 @ CMU)
Recommender Systems (Machine Learning Summer School 2014 @ CMU)
 
Report Writing - Conclusions & Recommendations sections
Report Writing - Conclusions & Recommendations sectionsReport Writing - Conclusions & Recommendations sections
Report Writing - Conclusions & Recommendations sections
 

Similar to Recommendation engines

Building a Recommender systems by Vivek Murugesan - Technical Architect at Cr...
Building a Recommender systems by Vivek Murugesan - Technical Architect at Cr...Building a Recommender systems by Vivek Murugesan - Technical Architect at Cr...
Building a Recommender systems by Vivek Murugesan - Technical Architect at Cr...
Rajasekar Nonburaj
 
Recommender systems
Recommender systemsRecommender systems
Recommender systems
Vivek Murugesan
 
Recommandation systems -
Recommandation systems - Recommandation systems -
Recommandation systems -
Yousef Fadila
 
Introduction to Recommendation Systems
Introduction to Recommendation SystemsIntroduction to Recommendation Systems
Introduction to Recommendation Systems
Zia Babar
 
Recommender.system.presentation.pjug.01.21.2014
Recommender.system.presentation.pjug.01.21.2014Recommender.system.presentation.pjug.01.21.2014
Recommender.system.presentation.pjug.01.21.2014
rpbrehm
 
Mahout
MahoutMahout
Recommendation Systems
Recommendation SystemsRecommendation Systems
Recommendation Systems
Hilary Aben
 
Tag based recommender system
Tag based recommender systemTag based recommender system
Tag based recommender system
Karen Li
 
Introduction to Recommendation Systems (Vietnam Web Submit)
Introduction to Recommendation Systems (Vietnam Web Submit)Introduction to Recommendation Systems (Vietnam Web Submit)
Introduction to Recommendation Systems (Vietnam Web Submit)
Trieu Nguyen
 
SDEC2011 Mahout - the what, the how and the why
SDEC2011 Mahout - the what, the how and the whySDEC2011 Mahout - the what, the how and the why
SDEC2011 Mahout - the what, the how and the why
Korea Sdec
 
Modern Perspectives on Recommender Systems and their Applications in Mendeley
Modern Perspectives on Recommender Systems and their Applications in MendeleyModern Perspectives on Recommender Systems and their Applications in Mendeley
Modern Perspectives on Recommender Systems and their Applications in Mendeley
Kris Jack
 
recommendation system techunique and issue
recommendation system techunique and issuerecommendation system techunique and issue
recommendation system techunique and issue
NutanBhor
 
Architecting AI Solutions in Azure for Business
Architecting AI Solutions in Azure for BusinessArchitecting AI Solutions in Azure for Business
Architecting AI Solutions in Azure for Business
Ivo Andreev
 
3e recommendation engines_meetup
3e recommendation engines_meetup3e recommendation engines_meetup
3e recommendation engines_meetup
Pranab Ghosh
 
REAL-TIME RECOMMENDATION SYSTEMS
REAL-TIME RECOMMENDATION SYSTEMS REAL-TIME RECOMMENDATION SYSTEMS
REAL-TIME RECOMMENDATION SYSTEMS
BigDataCloud
 
Real-Time Recommendations with Hopsworks and OpenSearch - MLOps World 2022
Real-Time Recommendations  with Hopsworks and OpenSearch - MLOps World 2022Real-Time Recommendations  with Hopsworks and OpenSearch - MLOps World 2022
Real-Time Recommendations with Hopsworks and OpenSearch - MLOps World 2022
Jim Dowling
 
Recommender systems
Recommender systemsRecommender systems
Recommender systems
Tamer Rezk
 
Web usage mining
Web usage miningWeb usage mining
Web usage mining
Monu Chaudhary
 
Lecture Notes on Recommender System Introduction
Lecture Notes on Recommender System IntroductionLecture Notes on Recommender System Introduction
Lecture Notes on Recommender System Introduction
PerumalPitchandi
 
Recsys 2016
Recsys 2016Recsys 2016
Recsys 2016
Mindaugas Zickus
 

Similar to Recommendation engines (20)

Building a Recommender systems by Vivek Murugesan - Technical Architect at Cr...
Building a Recommender systems by Vivek Murugesan - Technical Architect at Cr...Building a Recommender systems by Vivek Murugesan - Technical Architect at Cr...
Building a Recommender systems by Vivek Murugesan - Technical Architect at Cr...
 
Recommender systems
Recommender systemsRecommender systems
Recommender systems
 
Recommandation systems -
Recommandation systems - Recommandation systems -
Recommandation systems -
 
Introduction to Recommendation Systems
Introduction to Recommendation SystemsIntroduction to Recommendation Systems
Introduction to Recommendation Systems
 
Recommender.system.presentation.pjug.01.21.2014
Recommender.system.presentation.pjug.01.21.2014Recommender.system.presentation.pjug.01.21.2014
Recommender.system.presentation.pjug.01.21.2014
 
Mahout
MahoutMahout
Mahout
 
Recommendation Systems
Recommendation SystemsRecommendation Systems
Recommendation Systems
 
Tag based recommender system
Tag based recommender systemTag based recommender system
Tag based recommender system
 
Introduction to Recommendation Systems (Vietnam Web Submit)
Introduction to Recommendation Systems (Vietnam Web Submit)Introduction to Recommendation Systems (Vietnam Web Submit)
Introduction to Recommendation Systems (Vietnam Web Submit)
 
SDEC2011 Mahout - the what, the how and the why
SDEC2011 Mahout - the what, the how and the whySDEC2011 Mahout - the what, the how and the why
SDEC2011 Mahout - the what, the how and the why
 
Modern Perspectives on Recommender Systems and their Applications in Mendeley
Modern Perspectives on Recommender Systems and their Applications in MendeleyModern Perspectives on Recommender Systems and their Applications in Mendeley
Modern Perspectives on Recommender Systems and their Applications in Mendeley
 
recommendation system techunique and issue
recommendation system techunique and issuerecommendation system techunique and issue
recommendation system techunique and issue
 
Architecting AI Solutions in Azure for Business
Architecting AI Solutions in Azure for BusinessArchitecting AI Solutions in Azure for Business
Architecting AI Solutions in Azure for Business
 
3e recommendation engines_meetup
3e recommendation engines_meetup3e recommendation engines_meetup
3e recommendation engines_meetup
 
REAL-TIME RECOMMENDATION SYSTEMS
REAL-TIME RECOMMENDATION SYSTEMS REAL-TIME RECOMMENDATION SYSTEMS
REAL-TIME RECOMMENDATION SYSTEMS
 
Real-Time Recommendations with Hopsworks and OpenSearch - MLOps World 2022
Real-Time Recommendations  with Hopsworks and OpenSearch - MLOps World 2022Real-Time Recommendations  with Hopsworks and OpenSearch - MLOps World 2022
Real-Time Recommendations with Hopsworks and OpenSearch - MLOps World 2022
 
Recommender systems
Recommender systemsRecommender systems
Recommender systems
 
Web usage mining
Web usage miningWeb usage mining
Web usage mining
 
Lecture Notes on Recommender System Introduction
Lecture Notes on Recommender System IntroductionLecture Notes on Recommender System Introduction
Lecture Notes on Recommender System Introduction
 
Recsys 2016
Recsys 2016Recsys 2016
Recsys 2016
 

Recently uploaded

How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
FODUU
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 

Recently uploaded (20)

How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 

Recommendation engines

  • 1. Cegeka AI/ML Competence Center Recommendation engines Theory and intro to Georgian Micsa
  • 2. Georgian Micsa ● Software engineer with 6+ years of experience, mainly Java but also JavaScript and .NET ● Interested on OOD, architecture and agile software development methodologies ● Currently working as Senior Java Developer @ Cegeka ● georgian.micsa@gmail.com ● http://ro.linkedin.com/in/georgianmicsa
  • 3. What is it? ● Recommender/recommendation system/engine/platform ● A subclass of information filtering system ● Predict the 'rating' or 'preference' that a user would give to a new item (music, books, movies, people or groups etc) ● Can use a model built from the characteristics of an item (content-based approaches) ● Can use the user's social environment (collaborative filtering approaches)
  • 4. Examples ● Amazon.com ○ Recommend additional books ○ Frequently bought together books ○ Implemented using a sparse matrix of book cooccurrences ● Pandora Radio ○ Plays music with similar characteristics ○ Content based filtering based on properties of song/artist ○ Based also on user's feedback ○ Users emphasize or deemphasize certain characteristics
  • 5. Examples 2 ● Last.fm ○ Collaborative filtering ○ Recommends songs by observing the tracks played by user and comparing to behaviour of other users ○ Suggests songs played by users with similar interests ● Netflix ○ Predictions of movies ○ Hybrid approach ○ Collaborative filtering based on user`s previous ratings and watching behaviours (compared to other users) ○ Content based filtering based on characteristics of movies
  • 6. Collaborative filtering ● Collect and analyze a large amount of information on users’ behaviors, activities or preferences ● Predict what users will like based on their similarity to other users ● It does not rely on the content of the items ● Measures user similarity or item similarity ● Many algorithms: ○ the k-nearest neighborhood (k-NN) ○ the Pearson Correlation ○ etc.
  • 7. Collaborative filtering 2 ● Build a model from user's profile collecting explicit and implicit data ● Explicit data: ○ Asking a user to rate an item on a sliding scale. ○ Rank a collection of items from favorite to least favorite. ○ Presenting two items to a user and asking him/her to choose the better one of them. ○ Asking a user to create a list of items that he/she likes. ● Implicit data: ○ Observing the items that a user views in an online store. ○ Analyzing item/user viewing times ○ Keeping a record of the items that a user purchases online. ○ Obtaining a list of items that a user has listened to or watched ○ Analyzing the user's social network and discovering similar likes and dislikes
  • 8. Collaborative filtering 3 ● Collaborative filtering approaches often suffer from three problems: ○ Cold Start: needs a large amount of existing data on a user in order to make accurate recommendations ○ Scalability: a large amount of computation power is often necessary to calculate recommendations. ○ Sparsity: The number of items sold on major e-commerce sites is extremely large. The most active users will only have rated a small subset of the overall database. Thus, even the most popular items have very few ratings.
  • 9. Content-based filtering ● Based on information about and characteristics of the items ● Try to recommend items that are similar to those that a user liked in the past (or is examining in the present) ● Use an item profile (a set of discrete attributes and features) ● Content-based profile of users based on a weighted vector of item features ● The weights denote the importance of each feature to the user ● To compute the weights: ○ average values of the rated item vector ○ Bayesian Classifiers, cluster analysis, decision trees, and artificial neural networks
  • 10. Content-based filtering 2 ● Can collect feedback from user to assign higher or lower weights on the importance of certain attributes ● Cross-content recommendation: music, videos, products, discussions etc. from different services can be recommended based on news browsing. ● Popular for movie recommendations: Internet Movie Database, See This Next etc.
  • 11. Hybrid Recommender Systems ● Combines collaborative filtering and content-based filtering ● Implemented in several ways: ○ by making content-based and collaborative-based predictions separately and then combining them ○ by adding content-based capabilities to a collaborative-based approach (and vice versa) ○ by unifying the approaches into one model ● Studies have shown that hybrid methods can provide more accurate recommendations than pure approaches ● Overcome cold start and the sparsity problems ● Netflix and See This Next
  • 12. What is Apache Mahout? ● A scalable Machine Learning library ● Apache License ● Scalable to reasonably large datasets (core algorithms implemented in Map/Reduce, runnable on Hadoop) ● Distributed and non-distributed algorithms ● Community ● Usecases • Clustering (group items that are topically related) • Classification (learn to assign categories to documents) • Frequent Itemset Mining (find items that appear together) • Recommendation Mining (find items a user might like)
  • 13. Non-distributed recommenders ● Non-distributed, non Hadoop, collaborative recommender algorithms ● Java or external server which exposes recommendation logic to your application via web services and HTTP ● Key interfaces: ○ DataModel: CSV files or database ○ UserSimilarity: computes similarity between users ○ ItemSimilarity: computes similarity between items ○ UserNeighborhood: used for similarity of users ○ Recommender: produces recommendations ● Different implementations based on your needs ● Input in this format: UserId,ItemId,[Preference or Rating] ● Preference is not needed in case of associations (pages viewed by users)
  • 14. User-based recommender example DataModel model = new FileDataModel(new File("data.txt")); UserSimilarity userSimilarity = new PearsonCorrelationSimilarity(model); // Optional: userSimilarity.setPreferenceInferrer(new AveragingPreferenceInferrer()); UserNeighborhood neighborhood = new NearestNUserNeighborhood(3, userSimilarity, model); Recommender recommender = new GenericUserBasedRecommender(model, neighborhood, userSimilarity); Recommender cachingRecommender = new CachingRecommender(recommender); List<RecommendedItem> recommendations = cachingRecommender.recommend(1234, 10);
  • 15. Item-based recommender example DataModel model = new FileDataModel(new File("data.txt")); // Construct the list of pre-computed correlations Collection<GenericItemSimilarity.ItemItemSimilarity> correlations = ...; ItemSimilarity itemSimilarity = new GenericItemSimilarity(correlations); Recommender recommender = new GenericItemBasedRecommender(model, itemSimilarity); Recommender cachingRecommender = new CachingRecommender(recommender); List<RecommendedItem> recommendations = cachingRecommender.recommend(1234, 10);
  • 16. Recommender evaluation For preference data models: DataModel myModel = ...; RecommenderBuilder builder = new RecommenderBuilder() { public Recommender buildRecommender(DataModel model) { // build and return the Recommender to evaluate here } }; RecommenderEvaluator evaluator = new AverageAbsoluteDifferenceRecommenderEvaluator(); double evaluation = evaluator.evaluate(builder, myModel, 0.9, 1.0); For boolean data models, precision and recall can be computed.
  • 17. Distributed Item Based ● Mahout offers 2 Hadoop Map/Reduce jobs aimed to support Itembased Collaborative Filtering ● org.apache.mahout.cf.taste.hadoop.similarity.item.ItemSimilarityJob ○ computes all similar items ○ input is a CSV file with theformat userID,itemID,value ○ output is a file of itemIDs with their associated similarity value ○ different configuration options: eg. similarity measure to use (co occurrence, Euclidian distance, Pearson correlation, etc.) ● org.apache.mahout.cf.taste.hadoop.item.RecommenderJob ○ Completely distributed itembased recommender ○ input is a CSV file with the format userID,itemID,value ○ output is a file of userIDs with associated recommended itemIDs and their scores ○ also configuration options
  • 18. Mahout tips ● Start with non-distributed recommenders ● 100M user-item associations can be handled by a modern server with 4GB of heap available as a real-time recommender ● Over this scale distributed algorithms make sense ● Data can be sampled, noisy and old data can be pruned ● Ratings: GenericItemBasedRecommender and PearsonCorrelationSimilarity ● Preferences: GenericBooleanPrefItemBasedRecommender and LogLikelihoodSimilarity ● Content-based item-item similarity => your own ItemSimilarity
  • 19. Mahout tips 2 ● CSV files ○ FileDataModel ○ push new files periodically ● Database ○ XXXJDBCDataModel ○ ReloadFromJDBCDataModel ● Offline or live recommendations? ○ Distributed algorithms => Offline periodical computations ○ Data is pushed periodically as CSV files or in DB ○ SlopeOneRecommender deals with updates quickly ○ Real time update of the DataModel and refresh recommander after some events (user rates an item etc.)
  • 20. References ● http://en.wikipedia.org/wiki/Recommender_system ● https://cwiki.apache.org/confluence/display/MAHOUT/Mahout+Wiki ● http://www.ibm.com/developerworks/java/library/j-mahout/ ● http://www.slideshare.net/sscdotopen/mahoutcf ● http://www.philippeadjiman.com/blog/2009/11/11/flexible- collaborative-filtering-in-java-with-mahout-taste/