GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van...

29
Creating the Best Teams Ever with Collaborative Filtering Maurits @vanderGoes Tuesday 26 April 2016 - GraphConnect Europe 2016

Transcript of GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van...

Page 1: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

Creating the Best Teams Ever with Collaborative Filtering

Maurits @vanderGoes

Tuesday 26 April 2016 - GraphConnect Europe 2016

Page 2: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes
Page 3: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

5 reasons for virtual teams

Flatorganisations

Interorganizationalcooperation

Workers’expectations

Serviceeconomy

Globalization

(Townsend et at., 1998)

Page 5: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes
Page 6: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

Architecture

API(Scala)

Platform(Meteor)

Recom. engine (GraphAware)

Recom. DB(Neo4j)

Importer(Java)

Platform DB(MongoDB)

HybridHybrid DB

Page 7: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

Logical Data Model in Neo4j

User

Network

Team

CityCountry

Strength

ACTIVE_IN

LIVES_IN

LOCATED_IN

LOCATED_IN

MEMBER_OF

PART_OF

LOCATED_IN

HOLDS

Page 9: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

GraphAware setup

Recommendation engine Post processor

Config

RewardSameLanguage

RewardSameCity

RewardSameCountry

PenalizePartners

RewardSameTags

Filter

FilterOutPrivate

FilterOutEnded

FilterOutNetwork

FilterOutDeactivated

MaxRecommendations

Blacklist

ExistingRelationships

NearbyTeamsViaNetworks

NearbyTeams

Logger

StatisticsLogger

RecommendationLogger

Page 10: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

MATCH (u:User)-[r:ACTIVE_IN]->(t:Team)WHERE id(u)={id} AND r.role>1.0RETURN t as blacklist

Blacklist

Page 11: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

Filter

MATCH (u:User),(n:Network)<-[:PART_OF]-(t:Team)

WHERE id(u)={id} AND n.privacy_type=3AND NOT (u)-[:MEMBER_OF]->(n)RETURN t as blacklist

MATCH (u:User),(t:Team)WHERE id(u)={id} AND t.privacy_type=2

AND NOT (u)-[:ACTIVE_IN {role:1.0}]->(t)RETURN t as blacklist

Page 12: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

5 Challenges for Filtering

Data sparsity (cold start)

Gray sheep Scalability Shilling attacks Synonymy

Page 14: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

User-based collaborative filtering algorithm

Page 15: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

User-based collaborative filtering algorithm

Page 16: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

User-based collaborative filtering algorithm

Page 17: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

User-based collaborative filtering algorithm

#1

#4

#2

#32x

4x

5x

1x

Page 18: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

MATCH (u1:User)-[r1:ACTIVE_IN]->(t:Team)<-[r2:ACTIVE_IN]-(u2:User)-[r3:ACTIVE_IN]->(reco:Team)

WHERE id(u1)={id}RETURN reco,

COLLECT(t._id) as team_id",u2._id as partner_id,(r1.role + r2.role + r3.role)/3 AS score

Nearby teams

Page 19: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

Nearby teams via networks

MATCH (u1:User)-[r1:MEMBER_OF]->(n:Network)<-[r2:MEMBER_OF]-(u2:User)-[r3:ACTIVE_IN]->(reco:Team)

WHERE id(u1)={id} AND r3.role>=1.5RETURN reco,

n._id as network_id, u2._id as member_id,count(*)*0.5 AS score

Page 20: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

Item-based collaborative filtering algorithm

4,5

2,3

3,7

2,6

3,94,1

Some relations are not shown for the visibility

Page 21: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

Item-based collaborative filtering algorithm

4,5

2,3

3,7

2,6

3,94,1

Some relations are not shown for the visibility

0,87321

Page 22: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

Item-based collaborative filtering algorithm

4,5

2,3

3,7

2,6

3,94,1

Some relations are not shown for the visibility

0,64962

Page 23: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

Item-based collaborative filtering algorithm

4,5

2,3

3,7

2,6

3,94,1

Predictedparticipation score: 3.6

Some relations are not shown for the visibility

0,87321

0,64962

Page 24: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

SimilarityMATCH (t1:Team), (t2:Team)WHERE t1<>t2MATCH (t1)<-[r:ACTIVE_IN]-(u:User)WITH toFloat(AVG(r.participation)) AS t1Mean, t1, t2MATCH (t2)<-[r:ACTIVE_IN]-(u:User)WITH toFloat(AVG(r.participation)) AS t2Mean, t1Mean, t1, t2MATCH (t1)<-[r1:ACTIVE_IN]-(u:User)-[r2:ACTIVE_IN]->(t2)WITH SUM((r1.participation-t1Mean)*(r2.participation-t2Mean))

AS numerator,SQRT(SUM((r1.participation-t1Mean)^2) *

SUM((r2.participation-t2Mean)^2)) AS denominator, t1, t2, COUNT(r1) AS r1Count

WHERE denominator<>0 AND r1Count>2MERGE (t1)-[q:SIMILARITY]-(t2)SET q.coefficient=(numerator/denominator)

Page 25: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

Item-based collaborative filtering

MATCH (u:User)-[a:ACTIVE_IN]->(t:Team)-[s:SIMILARITY]-(reco:Team)

WHERE id(u)={id}WITH AVG(a.participation*s.coefficient)

AS score, recoRETURN score, reco

Page 26: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

User feedback

Betterparticipation

score

Show contextRecognised their profile

Page 28: GraphConnect Europe 2016 - Creating the Best Teams Ever with Collaborative Filtering - Maurits van der Goes

Round-up

Filteringneeded

Easilycustomizable

ScalableDomainindependent

Hybrid