SlideShare uma empresa Scribd logo
1 de 59
Baixar para ler offline
Your	own
Recommendation
Engine
with	Neo4j and	Reco4PHP
About	me
• Christophe	Willemsen
• Neo4j	&	Elasticsearch Consultant	@	GraphAware
• Belgium
@ikwattro
What	we’ll	talk	about
• Challenges	of	a	recommendation	engine
• Quick	intro	to	graph	databases	(Neo4j)
• Reco4PHP
• Build	your	own	(demo)
Challenges	
of	a
Recommendation	
Engine
Recommendations	:	Overview
• News	you	should	read	(blogs)
• Books	you	should	buy	(e-commerce)
• Persons	you	may	know	(social)
• Which	talk	to	attend	(knowledge)
• Which	service	is	best	suited	to	handle	a	given	failure	(impact	analysis)
• Finding	the	right	candidates	for	medical	proofs	(healthcare)
• …
Main	types	of	recommendations
• Content	based	(features)
• Collaborative	filtering	(relations	user	<->	item,	knn,	matrix	factorization)
• Knowledge	based
Combination	of	those	by	completely	crazy	scientists	+	secret	sauce
Business	Challenges
• Finding	things	to	recommend
• Serve	the	most	relevant	recommendations
• Measuring	the	quality	of	recommendations
• Time	to	market	/	cost	of	development
Business	challenges
Imagine	that	you	should	implement
the	feature
“People	you	may	know”
on	LinkedIn
Business	challenges	:	Finding	candidates
• Common	contacts
• Facebook	friends	in	common
• Mobile/email	contacts	in	common
• All	contacts	of	your	contacts
• Worked	for	same	company
• Studied	at	same	school
• Share	same	interests
• Lives	in	same	city
Business	challenges
It’s	just	the	beginning	!
Let’s	revisit	…
Business	challenges	:	most	relevant
More	contacts	in	common:	
More	relevant	?
Business	challenges	:	most	relevant
Same	city,	worked	for	same	company,	
studied	at	same	school
Business	challenges	:	most	relevant
What	to	do	with	emails	that
actually	don’t	represent	a	person?
Should	we	recommend info@coolblue.nl?
Business	challenges	:	most	relevant
What	should	we	do	with	contacts
pending?
rejected?
always	ignored?
Technical	Challenges
• Simplicity
• Performance	(Real-time	or	near	real-time)
• Flexibility
Intro	to	
Graph	Databases
(	Neo4j	)
is	a
graph	database.
Nodes
A	node	can	have	one	or	multiple	labels
Person, Male
A	node	can	one	or	more	properties
Person, Male
name : Mark
Nodes	are	connected	by	relationships
Relationships	have	a	type
Relationships	have	a	direction
Relationships	can	have	properties
Cypher	:	the	query	language	for	graphs
Declarative	pattern	matching	language
Describe	
what	you	want	
to	retrieve	from	the	database,	
not	
how	to	get	it.
Declarative	pattern	matching	language
MATCH	(you:Person {name:”You”})-[:ATTENDED]->(talk),
(talk)<-[:ATTENDED]-(other)
WHERE	(you)-[:LIVES_IN]->(city)<-[:LIVES_IN]-(other)
AND	you <>	other
RETURN	other AS	maybeFriend
Why	graphs	?
Technical	Challenges
• Simplicity
• Performance	(Real-time	or	near	real-time)
• Flexibility
Simplicity
Features as	well	as	relationshipsare	
naturally	represented	in	
a	graph database.
Simplicity
The	recommendation logic	can	be	
represented	in	a	graph	traversal.
Technical	Challenges
• Simplicity
• Performance	(Real-time)
• Flexibility
Performance
• Relationships	are	first	class	citizens	(	no	joins	!	)
• Traversing	relationships	in	Neo4j	is	cheap
(	4	millions	traversals	per	second	per	core	)
Reco4PHP	
Open	Source
Recommendation	Engine	
Skeleton	
atop	Neo4j
Reco4PHP
• Standalone	PHP	library
• Opinionated	architecture
• Flexible
• Handle	all	the	glue
Architecture
• Input	->	Discovery	Engines	->	Recommendations
• Scores	and	Score	builders
• Blacklists	and	Filters
• Post	Processors
• Context	(how	many,		meteo,	all	k/v	external	factors..)
Design	decisions
• DiscoveryEngine per	recommendation	“reason”	(core	logic)
• DiscoveryEngine executes	a	graph	traversal
(Cypher	query)
• Items	discovered	multiple	times	are	more	relevant
Technical	Challenges
• Simplicity
• Performance	(Real-time	or	near	real-time)
• Flexibility
Let’s	build	one
In	5	minutes,	we’ll	build	a	simple	engine	that
recommends	repositories	you	might
be	interested	in	on	Github.
composer	require	graphaware/reco4php
0.	The	Model
:STARS
:CONTRIBUTED_TO
:OWNS
:FOLLOWS
:FOLLOWS
:WRITTEN_IN
1.	Discover
Find	repositories	starred	by	the	people	you	follow	or	following	
you.
2.	Serve	only	relevant	recommendations
We’ll	create	a	blacklist	that	will	exclude	the	repositories	I	am	
the	owner	of.
3.	Post	process
We’ll	reward	the	recommended	repositories	by	let’s	say	5	
points	if	they	are	written	in	PHP.
4.	Assemble
5.	Tadaaaaaam
Thank	you	!
Questions	?
graphaware.com
github.com/graphaware
@ikwattro

Mais conteúdo relacionado

Destaque

Requirements for Processing Datasets for Recommender Systems
Requirements for Processing Datasets for Recommender SystemsRequirements for Processing Datasets for Recommender Systems
Requirements for Processing Datasets for Recommender Systems
Stoitsis Giannis
 
Recommender Systems in E-Commerce
Recommender Systems in E-CommerceRecommender Systems in E-Commerce
Recommender Systems in E-Commerce
Roger Chen
 
Item Based Collaborative Filtering Recommendation Algorithms
Item Based Collaborative Filtering Recommendation AlgorithmsItem Based Collaborative Filtering Recommendation Algorithms
Item Based Collaborative Filtering Recommendation Algorithms
nextlib
 

Destaque (20)

Recommendation engine
Recommendation engineRecommendation engine
Recommendation engine
 
Multi Criteria Recommender Systems - Overview
Multi Criteria Recommender Systems - OverviewMulti Criteria Recommender Systems - Overview
Multi Criteria Recommender Systems - Overview
 
Summary of a Recommender Systems Survey paper
Summary of a Recommender Systems Survey paperSummary of a Recommender Systems Survey paper
Summary of a Recommender Systems Survey paper
 
Profile injection attack detection in recommender system
Profile injection attack detection in recommender systemProfile injection attack detection in recommender system
Profile injection attack detection in recommender system
 
Recommendation Engine Project Presentation
Recommendation Engine Project PresentationRecommendation Engine Project Presentation
Recommendation Engine Project Presentation
 
Recommender Systems and Active Learning
Recommender Systems and Active LearningRecommender Systems and Active Learning
Recommender Systems and Active Learning
 
Online recommendations at scale using matrix factorisation
Online recommendations at scale using matrix factorisationOnline recommendations at scale using matrix factorisation
Online recommendations at scale using matrix factorisation
 
Tutorial: Context-awareness In Information Retrieval and Recommender Systems
Tutorial: Context-awareness In Information Retrieval and Recommender SystemsTutorial: Context-awareness In Information Retrieval and Recommender Systems
Tutorial: Context-awareness In Information Retrieval and Recommender Systems
 
Requirements for Processing Datasets for Recommender Systems
Requirements for Processing Datasets for Recommender SystemsRequirements for Processing Datasets for Recommender Systems
Requirements for Processing Datasets for Recommender Systems
 
Overview of recommender system
Overview of recommender systemOverview of recommender system
Overview of recommender system
 
Recommendation Engine Demystified
Recommendation Engine DemystifiedRecommendation Engine Demystified
Recommendation Engine Demystified
 
Recommender Systems in E-Commerce
Recommender Systems in E-CommerceRecommender Systems in E-Commerce
Recommender Systems in E-Commerce
 
Item Based Collaborative Filtering Recommendation Algorithms
Item Based Collaborative Filtering Recommendation AlgorithmsItem Based Collaborative Filtering Recommendation Algorithms
Item Based Collaborative Filtering Recommendation Algorithms
 
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
 
Build Your Own Recommendation Engine
Build Your Own Recommendation EngineBuild Your Own Recommendation Engine
Build Your Own Recommendation Engine
 
How to build a Recommender System
How to build a Recommender SystemHow to build a Recommender System
How to build a Recommender System
 
Comparative Recommender System Evaluation: Benchmarking Recommendation Frame...
Comparative Recommender System Evaluation: Benchmarking Recommendation Frame...Comparative Recommender System Evaluation: Benchmarking Recommendation Frame...
Comparative Recommender System Evaluation: Benchmarking Recommendation Frame...
 
genetic algorithm based music recommender system
genetic algorithm based music recommender systemgenetic algorithm based music recommender system
genetic algorithm based music recommender system
 
How to Design Retail Recommendation Engines with Neo4j
How to Design Retail Recommendation Engines with Neo4jHow to Design Retail Recommendation Engines with Neo4j
How to Design Retail Recommendation Engines with Neo4j
 
A Quick Tutorial on Mahout’s Recommendation Engine (v 0.4)
A Quick Tutorial on Mahout’s Recommendation Engine (v 0.4)A Quick Tutorial on Mahout’s Recommendation Engine (v 0.4)
A Quick Tutorial on Mahout’s Recommendation Engine (v 0.4)
 

Semelhante a Your own recommendation engine with neo4j and reco4php - DPC16

Class 9 seo, linked in, other social networks
Class 9 seo, linked in, other social networksClass 9 seo, linked in, other social networks
Class 9 seo, linked in, other social networks
prds129
 
IDM Assignment revision certificate Nov '11
IDM Assignment revision certificate Nov '11IDM Assignment revision certificate Nov '11
IDM Assignment revision certificate Nov '11
Steve Kemish
 
Getting it Right with Keyword Research - Stukent Expert Session
Getting it Right with Keyword Research - Stukent Expert SessionGetting it Right with Keyword Research - Stukent Expert Session
Getting it Right with Keyword Research - Stukent Expert Session
Stukent Inc.
 
EMMF - Sean campbell Competitive Intelligence presentation
EMMF - Sean campbell   Competitive Intelligence presentationEMMF - Sean campbell   Competitive Intelligence presentation
EMMF - Sean campbell Competitive Intelligence presentation
Zoom Industries
 

Semelhante a Your own recommendation engine with neo4j and reco4php - DPC16 (20)

Gathering Internet Intelligence
Gathering Internet IntelligenceGathering Internet Intelligence
Gathering Internet Intelligence
 
Gathering Internet Intelligence
Gathering Internet IntelligenceGathering Internet Intelligence
Gathering Internet Intelligence
 
The 7-Step SEO Keyword Research Process By Jon Rognerud
The 7-Step SEO Keyword Research Process By Jon RognerudThe 7-Step SEO Keyword Research Process By Jon Rognerud
The 7-Step SEO Keyword Research Process By Jon Rognerud
 
ASIALYST Community Blog Innovation Training :: Day 1
ASIALYST Community Blog Innovation Training :: Day 1ASIALYST Community Blog Innovation Training :: Day 1
ASIALYST Community Blog Innovation Training :: Day 1
 
The Four Steps to SEO Domination
The Four Steps to SEO DominationThe Four Steps to SEO Domination
The Four Steps to SEO Domination
 
Week4 bus 305
Week4 bus 305Week4 bus 305
Week4 bus 305
 
Class 9 seo, linked in, other social networks
Class 9 seo, linked in, other social networksClass 9 seo, linked in, other social networks
Class 9 seo, linked in, other social networks
 
IDM Assignment revision certificate Nov '11
IDM Assignment revision certificate Nov '11IDM Assignment revision certificate Nov '11
IDM Assignment revision certificate Nov '11
 
Getting it Right with Keyword Research - Stukent Expert Session
Getting it Right with Keyword Research - Stukent Expert SessionGetting it Right with Keyword Research - Stukent Expert Session
Getting it Right with Keyword Research - Stukent Expert Session
 
Ria Sankar - How to Build Winning Products - Product School Bellevue - 83018
Ria Sankar - How to Build Winning Products - Product School Bellevue - 83018 Ria Sankar - How to Build Winning Products - Product School Bellevue - 83018
Ria Sankar - How to Build Winning Products - Product School Bellevue - 83018
 
HighRoad U Webinar: How to Create a Keyword Strategy
HighRoad U Webinar: How to Create a Keyword StrategyHighRoad U Webinar: How to Create a Keyword Strategy
HighRoad U Webinar: How to Create a Keyword Strategy
 
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
 
About Schematiq
About SchematiqAbout Schematiq
About Schematiq
 
Energize 2013 slides
Energize 2013 slidesEnergize 2013 slides
Energize 2013 slides
 
EMMF - Sean campbell Competitive Intelligence presentation
EMMF - Sean campbell   Competitive Intelligence presentationEMMF - Sean campbell   Competitive Intelligence presentation
EMMF - Sean campbell Competitive Intelligence presentation
 
EMMF - Sean campbell Competitive Intelligence presentation
EMMF - Sean campbell   Competitive Intelligence presentationEMMF - Sean campbell   Competitive Intelligence presentation
EMMF - Sean campbell Competitive Intelligence presentation
 
Getting creative with content - how to engage and inspire your audience throu...
Getting creative with content - how to engage and inspire your audience throu...Getting creative with content - how to engage and inspire your audience throu...
Getting creative with content - how to engage and inspire your audience throu...
 
Billgren - Value Based Marketing Product Summit.pdf
Billgren - Value Based Marketing Product Summit.pdfBillgren - Value Based Marketing Product Summit.pdf
Billgren - Value Based Marketing Product Summit.pdf
 
Content marketing for business
Content marketing for businessContent marketing for business
Content marketing for business
 
Романа Косцик “New project begins. Jump in and keep calm. Everything will be ...
Романа Косцик “New project begins. Jump in and keep calm. Everything will be ...Романа Косцик “New project begins. Jump in and keep calm. Everything will be ...
Романа Косцик “New project begins. Jump in and keep calm. Everything will be ...
 

Mais de Christophe Willemsen

Mais de Christophe Willemsen (11)

Knowledge graphs + Chatbots with Neo4j
Knowledge graphs + Chatbots with Neo4jKnowledge graphs + Chatbots with Neo4j
Knowledge graphs + Chatbots with Neo4j
 
Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...
Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...
Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...
 
Management des issues Github avec Neo4j et NLP
Management des issues Github avec Neo4j et NLPManagement des issues Github avec Neo4j et NLP
Management des issues Github avec Neo4j et NLP
 
Moteurs de recommendation avec Neo4j et GraphAwareReco
Moteurs de recommendation avec Neo4j et GraphAwareRecoMoteurs de recommendation avec Neo4j et GraphAwareReco
Moteurs de recommendation avec Neo4j et GraphAwareReco
 
Recommandations avec Neo4j et le GraphAware Recommendation Engine
Recommandations avec Neo4j et le GraphAware Recommendation EngineRecommandations avec Neo4j et le GraphAware Recommendation Engine
Recommandations avec Neo4j et le GraphAware Recommendation Engine
 
Neo4j au secours de l'Internet of Connected Things
Neo4j au secours de l'Internet of Connected ThingsNeo4j au secours de l'Internet of Connected Things
Neo4j au secours de l'Internet of Connected Things
 
Graph Database Prototyping made easy with Graphgen
Graph Database Prototyping made easy with GraphgenGraph Database Prototyping made easy with Graphgen
Graph Database Prototyping made easy with Graphgen
 
Graphgen - le générateur de graphes
Graphgen - le générateur de graphesGraphgen - le générateur de graphes
Graphgen - le générateur de graphes
 
Analysing Github events with Neo4j
Analysing Github events with Neo4jAnalysing Github events with Neo4j
Analysing Github events with Neo4j
 
Présentation symfony drupal
Présentation symfony drupalPrésentation symfony drupal
Présentation symfony drupal
 
GMDSS - Practice1
GMDSS - Practice1GMDSS - Practice1
GMDSS - Practice1
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
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
 

Último (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 

Your own recommendation engine with neo4j and reco4php - DPC16