recommendation engines with neo4j, symfony and reco4php

45
Recommendation engine services

Upload: christophe-willemsen

Post on 13-Apr-2017

344 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Recommendationengineservices

Page 2: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Aboutme

• ChristopheWillemsen• Neo4j&Elasticsearch SeniorConsultant@GraphAware• Belgium

Page 3: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Whatwe’lltalkabout

• Recommendationenginesoverview• Graphdatabases– Neo4j(thebestfitforreco engines)• Thereisalibraryforthat– Reco4PHP• Buildareco engineforrecommanding peopletofollowonGithub

Page 4: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Recommendations:Overview

• Newsyoushouldread• Booksyoushouldbuy• Personsyoumayknow• Whichversionofapackagetouse• Whichserviceisbestsuitedtohandlegivenfailure• Findingtherightcandidatesformedicalproofs• …

Page 5: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Maintypesofrecommendations

• Contentbased(features)• Collaborativefiltering(relationsuser<->item)

Page 6: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Thegoodnews

Features aswellasrelationships arenaturallyrepresentedinagraph database.

Page 7: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Neo4j– aquickintro

Page 8: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Thegoodnews

Therecommendation logiccanberepresentedinagraphtraversal.

Page 9: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Example

Page 10: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Recommendation:BusinessSide

Identifybusinessrulesinordertoprovide

recommendationsthatmatters

Page 11: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Example

Page 12: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Recommendation:BusinessSide

RecommendtoAlicemoviesratedbypersonswhoratedthesamemovies

thanherbutthatshedidn’tactuallyalreadyrated yet

Page 13: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Yourfirstrecommendationquery- Cypher

Page 14: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Recommandation :BusinessSide

IftheMoviehasaGenre thatinterest Alice,

add 1tothescore

Page 15: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Yoursecondrecommendationquery

Page 16: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Thereallifeismorecomplex

Thespecifications ofarecommendationengine

arefarmorecomplexinthereallife

Page 17: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Reallifeismorecomplex

Imaginethatyoushouldimplementthefeature

“Peopleyoumayknow”onLinkedIn

Page 18: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Reallifeismorecomplex

Afterabrainstormingsession,youcomeupwiththefollowingwaysoffindingpeople

youmayknow

Page 19: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Lifeismorecomplex• Commoncontacts• Facebookfriendsincommon•Mobile/emailcontactsincommon• Allcontactsofyourcontacts•Workedforsamecompany• Studiedatsameschool• Sharesameinterests• Livesinsamecity

Page 20: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Reallifeismorecomplex

Butit’sjustthebeginning.

Let’sgoback.

Page 21: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Reallifeismorecomplex

Morecontactsincommon:

Morerelevant?

Page 22: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Reallifeismorecomplex…

Samecityorstudiedatsameschool:

Doesthesizematters?

Page 23: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Reallifeismorecomplex

Whattodowithemailsthatactuallydon’trepresentaperson?

[email protected] ?

Page 24: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Reallifeismorecomplex

Whatshouldwedowithcontacts

Whoarepending?Whoarerejected?

Whoarealwaysignored?

Page 25: Recommendation Engines with Neo4j, Symfony and Reco4PHP
Page 26: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Reallifeismorecomplex

Basestepsofarecommendationengine

• Discover• Qualify• Removenonrelevant•Measurequality

Page 27: Recommendation Engines with Neo4j, Symfony and Reco4PHP

#Reco4PHPOpen-Source RecommendationEngineSkeleton

atop Neo4j

Page 28: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Reco4PHP

• StandalonePHPLibrary• Opinionatedarchitecture• Flexible• Handlealltheglue

Page 29: Recommendation Engines with Neo4j, Symfony and Reco4PHP

#Reco4PHPcomposerrequiregraphaware/reco4php

Page 30: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Let’sbuildarecommendationengine

Page 31: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Yourfirstrecommendationengine

ImaginewehaveagraphrepresentinginteractionsonGithub

Page 32: Recommendation Engines with Neo4j, Symfony and Reco4PHP
Page 33: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Yourfirstrecommendationengine

Ourintentionistorecommendpeopleyoumayfollowbasedonthefollowing:

• Morefollowersincommon=>bestscore• Contributedtothesamerepository• Penalizetoomuchfollowers• Excludebots• Peopleyoualreadyfollowshouldn’tberecommended• Wedon’twanttorecommendtheuseritselfofcourse

Page 34: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Discover

Page 35: Recommendation Engines with Neo4j, Symfony and Reco4PHP
Page 36: Recommendation Engines with Neo4j, Symfony and Reco4PHP
Page 37: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Qualify

Page 38: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Qualify

Page 39: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Blacklistsetfiltres

Wecouldcreateablacklistorafilter forexcludingtheuserforwhomwearerecommending

people,butlet’susesomethingbuilt-in.

Page 40: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Bindalltogether

Page 41: Recommendation Engines with Neo4j, Symfony and Reco4PHP
Page 42: Recommendation Engines with Neo4j, Symfony and Reco4PHP
Page 43: Recommendation Engines with Neo4j, Symfony and Reco4PHP

demo

Page 44: Recommendation Engines with Neo4j, Symfony and Reco4PHP

Questions?

Page 45: Recommendation Engines with Neo4j, Symfony and Reco4PHP

#thank_youTwitter:@ikwattro- @graph_aware

http://graphaware.comhttps://github.com/graphaware