SlideShare une entreprise Scribd logo
1  sur  14
COLLABORATIVE FILTERING
USING KNN ALGORITHM
Şeyda HATİPOĞLU 11.06.2013
Recommender Systems
• Software tools and techniques providing suggestions for items
to be of use to a user
• Recommender systems analyze patterns of user interest in
items or products to provide personalized recommendations
of items that will suit a user’s taste
Item - What the system recommends to the user
(CD, news, books, movies...)
User preferences - ratings for products
User actions - user browsing history
RS Techniques
• Collaborative-Filtering system
– recommends to the active user the items that
other users with similar tastes liked in the past
• Content-based system
– recommend items that are similar to the ones that
the user liked in the past
• Hybrid-Collaborative Filtering
• Tagging: recommends items using tags
assigned by different users
Collaborative Filtering
• trying to predict the opinion the user will have on the
different items and be able to recommend the “best”
items to each user based on the user’s previous
likings and the opinions of other like minded users.
Collaborative Filtering
• The task of a CF algorithm is to find item likeliness of two
forms :
Prediction – a numerical value, expressing the predicted
likeliness value about an item of the active user
Recommendation – a list of N items that the active user will
like the most
K Nearest Neighbour Algorithm
• A distance measure is needed to determine the
“closeness” of instances
• Classify an instance by finding its nearest neighbors
and picking the most popular class among the
neighbors
Mega
Mind
Toy Story Despicabl
e Me
Lion King Kung Fu
Panda
Zeynep 4 5 3 2 4
Funda 3 3 2 3 5
Pınar 3 3 4 2 3
Gülten 4 4 5 4 5
Yağız 4 5 ? 4 5
Rating Prediction
Application
• MovieLens Database (1M)
 3883 movies
 6040 users
 1000209 ratings
• Technologies
 ASP.Net 4.0
 MS SQL Server 2008
RATING PREDICTION DATABASE DIAGRAM
Movies
MovieID
Title
Genre
Ratings
ID
UserID
MovieID
Rating
Timestamp
Users
UserID
Gender
Age
Occupation
ZipCode
Age
Id
Description
Occupation
Id
Description
Predictions
ID
UserID
MostSimilarUserID
Difference
TimeElapsed
MovieID
PredictedRating
ActualRating
Error Measurement
Mean Square Error (MSE)=0.975
Mean Absolute Error(MAE)=0.679
DEMO
Pro
Con
• Cold-start Problem
• Storage: all training
examples are saved in
memory
• Time: to classify x, you
need to loop over all
training examples (x’,y’) to
compute distance between
x and x’.
 Simple to implement and
use
 Comprehensible – easy to
explain prediction
 Robust to noisy data by
averaging k-nearest
neighbors
KNN Algorithm
Conclusion
 Recommending and personalization are important
approaches to combating information over-load.
 Machine Learning is an important part of systems for
these tasks.
 Collaborative Filtering has its own problems
 Better results would be achieved by use of
content, tags and more optimized similarity
functions.
Thank you

Contenu connexe

Tendances

Recommender system introduction
Recommender system   introductionRecommender system   introduction
Recommender system introduction
Liang Xiang
 
Recommender system algorithm and architecture
Recommender system algorithm and architectureRecommender system algorithm and architecture
Recommender system algorithm and architecture
Liang Xiang
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender Systems
Lior Rokach
 

Tendances (20)

An introduction to Recommender Systems
An introduction to Recommender SystemsAn introduction to Recommender Systems
An introduction to Recommender Systems
 
Recommender system introduction
Recommender system   introductionRecommender system   introduction
Recommender system introduction
 
Recommendation System
Recommendation SystemRecommendation System
Recommendation System
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender Systems
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender Systems
 
Recommender system algorithm and architecture
Recommender system algorithm and architectureRecommender system algorithm and architecture
Recommender system algorithm and architecture
 
Collaborative Filtering Recommendation System
Collaborative Filtering Recommendation SystemCollaborative Filtering Recommendation System
Collaborative Filtering Recommendation System
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender Systems
 
Recommender systems
Recommender systemsRecommender systems
Recommender systems
 
Boston ML - Architecting Recommender Systems
Boston ML - Architecting Recommender SystemsBoston ML - Architecting Recommender Systems
Boston ML - Architecting Recommender Systems
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender Systems
 
Recommendation System Explained
Recommendation System ExplainedRecommendation System Explained
Recommendation System Explained
 
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)
 
Movie lens recommender systems
Movie lens recommender systemsMovie lens recommender systems
Movie lens recommender systems
 
Overview of recommender system
Overview of recommender systemOverview of recommender system
Overview of recommender system
 
Developing Movie Recommendation System
Developing Movie Recommendation SystemDeveloping Movie Recommendation System
Developing Movie Recommendation System
 
Recommendation system
Recommendation system Recommendation system
Recommendation system
 
Project presentation
Project presentationProject presentation
Project presentation
 
How to build a recommender system?
How to build a recommender system?How to build a recommender system?
How to build a recommender system?
 
Collaborative filtering
Collaborative filteringCollaborative filtering
Collaborative filtering
 

En vedette

Clustering Technique for Collaborative Filtering Recommendation and Applicat...
Clustering Technique for Collaborative  Filtering Recommendation and Applicat...Clustering Technique for Collaborative  Filtering Recommendation and Applicat...
Clustering Technique for Collaborative Filtering Recommendation and Applicat...
Pham Cuong
 
Netflix's Recommendation ML Pipeline Using Apache Spark: Spark Summit East ta...
Netflix's Recommendation ML Pipeline Using Apache Spark: Spark Summit East ta...Netflix's Recommendation ML Pipeline Using Apache Spark: Spark Summit East ta...
Netflix's Recommendation ML Pipeline Using Apache Spark: Spark Summit East ta...
Spark Summit
 

En vedette (10)

Clustering Technique for Collaborative Filtering Recommendation and Applicat...
Clustering Technique for Collaborative  Filtering Recommendation and Applicat...Clustering Technique for Collaborative  Filtering Recommendation and Applicat...
Clustering Technique for Collaborative Filtering Recommendation and Applicat...
 
MLlib: Spark's Machine Learning Library
MLlib: Spark's Machine Learning LibraryMLlib: Spark's Machine Learning Library
MLlib: Spark's Machine Learning Library
 
Apache Spark Machine Learning
Apache Spark Machine LearningApache Spark Machine Learning
Apache Spark Machine Learning
 
Large-scale Parallel Collaborative Filtering and Clustering using MapReduce f...
Large-scale Parallel Collaborative Filtering and Clustering using MapReduce f...Large-scale Parallel Collaborative Filtering and Clustering using MapReduce f...
Large-scale Parallel Collaborative Filtering and Clustering using MapReduce f...
 
Crab: A Python Framework for Building Recommender Systems
Crab: A Python Framework for Building Recommender Systems Crab: A Python Framework for Building Recommender Systems
Crab: A Python Framework for Building Recommender Systems
 
Collaborative filtering for recommendation systems in Python, Nicolas Hug
Collaborative filtering for recommendation systems in Python, Nicolas HugCollaborative filtering for recommendation systems in Python, Nicolas Hug
Collaborative filtering for recommendation systems in Python, Nicolas Hug
 
Recommender Systems with Apache Spark's ALS Function
Recommender Systems with Apache Spark's ALS FunctionRecommender Systems with Apache Spark's ALS Function
Recommender Systems with Apache Spark's ALS Function
 
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
 
Netflix's Recommendation ML Pipeline Using Apache Spark: Spark Summit East ta...
Netflix's Recommendation ML Pipeline Using Apache Spark: Spark Summit East ta...Netflix's Recommendation ML Pipeline Using Apache Spark: Spark Summit East ta...
Netflix's Recommendation ML Pipeline Using Apache Spark: Spark Summit East ta...
 
Machine Learning using Apache Spark MLlib
Machine Learning using Apache Spark MLlibMachine Learning using Apache Spark MLlib
Machine Learning using Apache Spark MLlib
 

Similaire à Collaborative Filtering using KNN

Data Mining and Recommendation Systems
Data Mining and Recommendation SystemsData Mining and Recommendation Systems
Data Mining and Recommendation Systems
Salil Navgire
 

Similaire à Collaborative Filtering using KNN (20)

Design Recommender systems from scratch
Design Recommender systems from scratchDesign Recommender systems from scratch
Design Recommender systems from scratch
 
Олександр Обєдніков “Рекомендательные системы”
Олександр Обєдніков “Рекомендательные системы”Олександр Обєдніков “Рекомендательные системы”
Олександр Обєдніков “Рекомендательные системы”
 
Big Data, Analytics, and Content Recommendations on AWS
Big Data, Analytics, and Content Recommendations on AWSBig Data, Analytics, and Content Recommendations on AWS
Big Data, Analytics, and Content Recommendations on AWS
 
Recommendation Systems Roadtrip
Recommendation Systems RoadtripRecommendation Systems Roadtrip
Recommendation Systems Roadtrip
 
Teacher training material
Teacher training materialTeacher training material
Teacher training material
 
OMRES-ProgressPresentation1.pptx
OMRES-ProgressPresentation1.pptxOMRES-ProgressPresentation1.pptx
OMRES-ProgressPresentation1.pptx
 
Use of data science in recommendation system
Use of data science in  recommendation systemUse of data science in  recommendation system
Use of data science in recommendation system
 
Recommendation engine Using Genetic Algorithm
Recommendation engine Using Genetic AlgorithmRecommendation engine Using Genetic Algorithm
Recommendation engine Using Genetic Algorithm
 
Data Mining and Recommendation Systems
Data Mining and Recommendation SystemsData Mining and Recommendation Systems
Data Mining and Recommendation Systems
 
recommendation system techunique and issue
recommendation system techunique and issuerecommendation system techunique and issue
recommendation system techunique and issue
 
Typicality based collaborative filtering recommendation
Typicality based collaborative filtering recommendationTypicality based collaborative filtering recommendation
Typicality based collaborative filtering recommendation
 
Lecture Notes on Recommender System Introduction
Lecture Notes on Recommender System IntroductionLecture Notes on Recommender System Introduction
Lecture Notes on Recommender System Introduction
 
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)
 
Recommandation systems -
Recommandation systems - Recommandation systems -
Recommandation systems -
 
A flexible recommenndation system for Cable TV
A flexible recommenndation system for Cable TVA flexible recommenndation system for Cable TV
A flexible recommenndation system for Cable TV
 
A Flexible Recommendation System for Cable TV
A Flexible Recommendation System for Cable TVA Flexible Recommendation System for Cable TV
A Flexible Recommendation System for Cable TV
 
Summit EU Machine Learning
Summit EU Machine LearningSummit EU Machine Learning
Summit EU Machine Learning
 
Data science for advanced dummies
Data science for advanced dummiesData science for advanced dummies
Data science for advanced dummies
 
Movie Recommendation System using ml.pptx
Movie Recommendation System using ml.pptxMovie Recommendation System using ml.pptx
Movie Recommendation System using ml.pptx
 
Recommender Systems in a nutshell
Recommender Systems in a nutshellRecommender Systems in a nutshell
Recommender Systems in a nutshell
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 

Collaborative Filtering using KNN

  • 1. COLLABORATIVE FILTERING USING KNN ALGORITHM Şeyda HATİPOĞLU 11.06.2013
  • 2. Recommender Systems • Software tools and techniques providing suggestions for items to be of use to a user • Recommender systems analyze patterns of user interest in items or products to provide personalized recommendations of items that will suit a user’s taste Item - What the system recommends to the user (CD, news, books, movies...) User preferences - ratings for products User actions - user browsing history
  • 3. RS Techniques • Collaborative-Filtering system – recommends to the active user the items that other users with similar tastes liked in the past • Content-based system – recommend items that are similar to the ones that the user liked in the past • Hybrid-Collaborative Filtering • Tagging: recommends items using tags assigned by different users
  • 4. Collaborative Filtering • trying to predict the opinion the user will have on the different items and be able to recommend the “best” items to each user based on the user’s previous likings and the opinions of other like minded users.
  • 5. Collaborative Filtering • The task of a CF algorithm is to find item likeliness of two forms : Prediction – a numerical value, expressing the predicted likeliness value about an item of the active user Recommendation – a list of N items that the active user will like the most
  • 6. K Nearest Neighbour Algorithm • A distance measure is needed to determine the “closeness” of instances • Classify an instance by finding its nearest neighbors and picking the most popular class among the neighbors
  • 7. Mega Mind Toy Story Despicabl e Me Lion King Kung Fu Panda Zeynep 4 5 3 2 4 Funda 3 3 2 3 5 Pınar 3 3 4 2 3 Gülten 4 4 5 4 5 Yağız 4 5 ? 4 5 Rating Prediction
  • 8. Application • MovieLens Database (1M)  3883 movies  6040 users  1000209 ratings • Technologies  ASP.Net 4.0  MS SQL Server 2008
  • 9. RATING PREDICTION DATABASE DIAGRAM Movies MovieID Title Genre Ratings ID UserID MovieID Rating Timestamp Users UserID Gender Age Occupation ZipCode Age Id Description Occupation Id Description Predictions ID UserID MostSimilarUserID Difference TimeElapsed MovieID PredictedRating ActualRating
  • 10. Error Measurement Mean Square Error (MSE)=0.975 Mean Absolute Error(MAE)=0.679
  • 11. DEMO
  • 12. Pro Con • Cold-start Problem • Storage: all training examples are saved in memory • Time: to classify x, you need to loop over all training examples (x’,y’) to compute distance between x and x’.  Simple to implement and use  Comprehensible – easy to explain prediction  Robust to noisy data by averaging k-nearest neighbors KNN Algorithm
  • 13. Conclusion  Recommending and personalization are important approaches to combating information over-load.  Machine Learning is an important part of systems for these tasks.  Collaborative Filtering has its own problems  Better results would be achieved by use of content, tags and more optimized similarity functions.