recommendation engines with neo4j, symfony and reco4php

Post on 13-Apr-2017

344 Views

Category:

Software

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Recommendationengineservices

Aboutme

• ChristopheWillemsen• Neo4j&Elasticsearch SeniorConsultant@GraphAware• Belgium

Whatwe’lltalkabout

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

Recommendations:Overview

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

Maintypesofrecommendations

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

Thegoodnews

Features aswellasrelationships arenaturallyrepresentedinagraph database.

Neo4j– aquickintro

Thegoodnews

Therecommendation logiccanberepresentedinagraphtraversal.

Example

Recommendation:BusinessSide

Identifybusinessrulesinordertoprovide

recommendationsthatmatters

Example

Recommendation:BusinessSide

RecommendtoAlicemoviesratedbypersonswhoratedthesamemovies

thanherbutthatshedidn’tactuallyalreadyrated yet

Yourfirstrecommendationquery- Cypher

Recommandation :BusinessSide

IftheMoviehasaGenre thatinterest Alice,

add 1tothescore

Yoursecondrecommendationquery

Thereallifeismorecomplex

Thespecifications ofarecommendationengine

arefarmorecomplexinthereallife

Reallifeismorecomplex

Imaginethatyoushouldimplementthefeature

“Peopleyoumayknow”onLinkedIn

Reallifeismorecomplex

Afterabrainstormingsession,youcomeupwiththefollowingwaysoffindingpeople

youmayknow

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

Reallifeismorecomplex

Butit’sjustthebeginning.

Let’sgoback.

Reallifeismorecomplex

Morecontactsincommon:

Morerelevant?

Reallifeismorecomplex…

Samecityorstudiedatsameschool:

Doesthesizematters?

Reallifeismorecomplex

Whattodowithemailsthatactuallydon’trepresentaperson?

Shouldwerecommendinfo@inviqa.com ?

Reallifeismorecomplex

Whatshouldwedowithcontacts

Whoarepending?Whoarerejected?

Whoarealwaysignored?

Reallifeismorecomplex

Basestepsofarecommendationengine

• Discover• Qualify• Removenonrelevant•Measurequality

#Reco4PHPOpen-Source RecommendationEngineSkeleton

atop Neo4j

Reco4PHP

• StandalonePHPLibrary• Opinionatedarchitecture• Flexible• Handlealltheglue

#Reco4PHPcomposerrequiregraphaware/reco4php

Let’sbuildarecommendationengine

Yourfirstrecommendationengine

ImaginewehaveagraphrepresentinginteractionsonGithub

Yourfirstrecommendationengine

Ourintentionistorecommendpeopleyoumayfollowbasedonthefollowing:

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

Discover

Qualify

Qualify

Blacklistsetfiltres

Wecouldcreateablacklistorafilter forexcludingtheuserforwhomwearerecommending

people,butlet’susesomethingbuilt-in.

Bindalltogether

demo

Questions?

#thank_youTwitter:@ikwattro- @graph_aware

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

top related