The 5 Graphs of Love

60 %
40 %
Information about The 5 Graphs of Love
Technology

Published on February 15, 2014

Author: neo4j

Source: slideshare.net

Description

Recorded webinar: neotechnology.com/webinar-five-graphs-love

The iDating industry cares about interactions and connections. Those two concepts are closely linked. If someone has a connection to another person, through a shared friend or a shared interest, they are much more likely to interact. Graph databases are optimized for querying connections between people, things, interests, or really anything that can be connected.

Dating sites and apps worldwide have begun to use graph databases to achieve competitive gain. Neo4j provides thousand-fold performance improvements and massive agility benefits over relational databases, enabling new levels of performance and insight. Amanda Laucher discusses the five graphs of love, and how companies like eHarmony, Hinge and AreYouInterested.com, are now using graph algorithms to create more interactions and connections.

(Neo4j)-[:POWERS] ->(Love) Amanda Laucher Neo Technology @pandamonial 1

Most of your favorite dating sites 2

The 5 Graphs of Love 3

The 5 Graphs of Love • The Friends-of-Friends Graph ! ! ! ! ! ! ! 4

The 5 Graphs of Love • The Friends-of-Friends Graph ! • The Passion Graph ! ! ! ! ! 5

The 5 Graphs of Love • The Friends-of-Friends Graph ! • The Passion Graph ! • The Location Graph ! ! ! 6

The 5 Graphs of Love • The Friends-of-Friends Graph ! • The Passion Graph ! • The Location Graph ! • The Safety Graph ! 7

The 5 Graphs of Love • The Friends-of-Friends Graph ! • The Passion Graph ! • The Location Graph ! • The Safety Graph ! • The Poser Graph 8

Meet Jeremy... ๏ from: California ๏ appearance: very handsome ๏ personality: super friendly nerd ๏ interests: piano, coding Jeremy

Jeremy has some friends ๏ Kerstin: his sister ๏ Peter: his buddy ๏ Andreas: his coworker Peter Andreas Jeremy Kerstin

His friends introduced more friends ๏ Michael: master hacker, divorced, 2 kids ๏ Johan: technology sage, likes fast cars ๏ Madelene: polyglot journalist, loves dogs ๏ Allison: marketing maven, likes long walks on the beach Michael Peter Andreas Johan Jeremy Madelene Allison Kerstin

So, we have a bunch of people ๏ how do we know they are friends? ๏ either ask each pair: are you friends? ๏ or, we can add explicit connections ๏ Twitter, Facebook, LinkedIn, etc. Michael Peter Andreas Johan Jeremy Madelene Allison Kerstin

This is really just data ๏ it's just a graph Michael Peter Johan Jeremy Allison Anna Andreas Madelene Kerstin Adam

A graph? 14

Yes, a graph... ๏ you know the common data structures •linked lists, trees, object "graphs" ๏ a graph is the general purpose data structure •suitable for any connected data ๏ well-understood patterns and algorithms •studied since Leonard Euler's 7 Bridges (1736) •Codd's Relational Model (1970) •not a new idea, just an idea who's time is now 15

How can you use this? With a Graph Database 16

A graph database... ๏ optimized for the connections between records ๏ really, really fast at querying across records ๏ a database: transactional with the usual operations ๏ “A relational database may tell you 
 the average age of everyone here, but a graph database will tell you 
 who is most likely to buy you a beer later.” 17

What’s love got to do with it? 18

Friends of Friends Graph 19

According to SNAP Interactive if you are a ! female user, you have a: ๏ 4% likelihood of interacting with a stranger ๏ 10% likelihood of interacting with friend of friend ๏ 7% chance of interacting with 3rd degree connection (friend of friend of friend) ๏ Connections mean a much larger number of interactions! Michael Peter Johan Jeremy Allison Anna Andreas Madelene Jennifer Adam

Friends of friends = larger dating pool 21

Friends Andreas Peter Jennifer Jeremy

Friends of friends Jeremy Peter Andreas Amanda Johan Jeremy Allison Frank Madelene Jennifer

Friends of friends of friends

Find Jeremy’s FoFs 25

Demo - Find who Jeremy shares the most friends with 26

Complicated Relationships Andreas :WORKS_FOR :FRIENDS :FRIENDS Peter Jake Jennifer

Friends :WANTS_TO_DATE Andreas :WORKS_FOR :FRIENDS :FRIENDS Peter Jake Jennifer

Friends :WANTS_TO_DATE Andreas :WORKS_FOR :FRIENDS :FRIENDS Peter Jake Jennifer Awkward!!

Friends of Friends :WANTS_TO_DATE :WANTS_TO_DATE Andreas :WORKS_FOR :FRIENDS :FRIENDS Peter Jennifer Jake Awkward

Friends of Friends :WANTS_TO_DATE :WANTS_TO_DATE Andreas :WORKS_FOR :FRIENDS :FRIENDS Peter Jennifer Jake :NO_DATE Too complex!

Friends of Friends of Friends :WANTS_TO_DATE :WANTS_TO_DATE :WORKS_FOR :FRIENDS :FRIENDS Andreas :WANTS_TO_DATE Peter Jennifer Jake :NO_DATE :NO_DATE :WANTS_TO_DATE

Friends of Friends of Friends

Friends of Friends of Friends

Meet Jon... ๏ from: UK ๏ seeking: Females ๏ appearance: Hot, hot, hot! ๏ personality: Fun loving, easy going ๏ interests: cooking, chemistry Jon

Location Graph 36

Jon wants to find a date and refuses to have a long distance relationship 37

Location Graph *Neo4j Spatial 38

Passion Graph 39

Jon wants to find someone he can share his passions with. 40

Match Specific Interests :REPORTED_INTEREST Jon Cooking

Match Specific Interests :REPORTED_INTEREST Jon

Match Specific Interests :REPORTED_INTEREST Jon Anne Julia Jennifer

Safety Graph 44

Jon uses social networks Jon

Let’s dig into his Twitter

He follows some strange people

…and tweets about strange things!

Some basic word analysis

Let’s update based on behavior :DEMONSTRATED_INTEREST Jon

Any ladies ok with this?

Any ladies ok with this? Jennifer Jane Maria

Passion Graph 53

Jon loves the New England Patriots :HAS_INTEREST Jon 54

:IS_A :IS_A Sports :IS_A :IS_A 55

Sports :IS_A :IS_A :IS_A :IS_A :HAS_TEAM :HAS_TEAM :HAS_TEAM :HAS_TEAM :HAS_TEAM 56

Sports :IS_A :IS_A :IS_A :IS_A :HAS_TEAM :HAS_TEAM :HAS_TEAM :HAS_TEAM :HAS_TEAM Jon 57

Sports Jon 58

Find ladies who like football 59

Find ladies who like football Katie Jennifer Greta 60

Poser Graph 61

Jon has no luck with online dating. All of his interactions are with spam profiles. 62

Find real people with at least 1 social network & minimum 2 posts 63

Find ladies who aren’t spam bots 64

Put it all together 65

Find Jon’s perfect date 66

Jon :PERFECT_FOR Jennifer 67

Jon :HAS_DATE_WITH Jennifer 68

Jon & Jennifer delete their profiles and go off into the sunset! Jon Jennifer 69

[:POWERS] [:AIDS] [:AIDS] Love [:AIDS] [:FOUND] [:AIDS] [:AIDS] Jon Jennifer

(Neo4j)-[:POWERS] ->(Love) Amanda Laucher Neo Technology 71

Performance Challenges with Connected Data RDBMS/Other vs. Native Graph Database Response Time 1000x faster # Hops: Tens to Hundreds Degree: Thousands+ Size: Billions+ # Hops: 0-2 Degree: < 3 Size: Thousands RDBMS / Other NOSQL Neo4j Connectedness of Data Set

Neo4j Adoption Snapshot Select Commercial Customers* (some NDA) Core Industries & Use Cases: Software Financial Services Core Industries Use Cases: Network & Data & Center Management Telecommu nications Health Care & Life Sciences Web / ISV Web Social, HR & Recruiting Financial Services Media & Publishing Energy, Services, Automotive, Gov’t, Logistics, Education, Gaming, Other Telecommunications MDM / System of Record Network & Data Center Management Social Geo Accenture Master Data Management Recommend-ations Identity & Access Mgmt Social Content Management Aviation Geo BI, CRM, Impact Analysis, Fraud Detection, Resource Optimization, etc. *Community Users Not Included Neo Technology, Inc Confidential

Graph Database Deployment Ad-hoc visual navigation & discovery End User Graph-
 Dashboards
 &
 Ad-hoc
 Analysis
 Graph Visualization Application Other Databases Reporting Bulk Analytic Infrastructure ETL ETL Graph Database Cluster (e.g. Graph Compute Engine) Graph Mining & Aggregation Ad-Hoc
 Analysis Data Storage &
 Business Rules Execution Data Scientist Neo Technology, Inc Confidential

Experiencing Query Pain Actual HR Query* (in SQL) (SELECT T.directReportees AS directReportees, sum(T.count) AS count FROM ( SELECT manager.pid AS directReportees, 0 AS count FROM person_reportee manager WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") UNION SELECT manager.pid AS directReportees, count(manager.directly_manages) AS count FROM person_reportee manager WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") GROUP BY directReportees UNION SELECT manager.pid AS directReportees, count(reportee.directly_manages) AS count FROM person_reportee manager JOIN person_reportee reportee ON manager.directly_manages = reportee.pid WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") GROUP BY directReportees UNION SELECT manager.pid AS directReportees, count(L2Reportees.directly_manages) AS count FROM person_reportee manager JOIN person_reportee L1Reportees ON manager.directly_manages = L1Reportees.pid JOIN person_reportee L2Reportees ON L1Reportees.directly_manages = L2Reportees.pid WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") GROUP BY directReportees ) AS T GROUP BY directReportees) UNION (SELECT T.directReportees AS directReportees, sum(T.count) AS count FROM ( SELECT manager.directly_manages AS directReportees, 0 AS count FROM person_reportee manager WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") UNION SELECT reportee.pid AS directReportees, count(reportee.directly_manages) AS count FROM person_reportee manager JOIN person_reportee reportee ON manager.directly_manages = reportee.pid WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") GROUP BY directReportees UNION (continued from previous page...) SELECT depth1Reportees.pid AS directReportees, count(depth2Reportees.directly_manages) AS count FROM person_reportee manager JOIN person_reportee L1Reportees ON manager.directly_manages = L1Reportees.pid JOIN person_reportee L2Reportees ON L1Reportees.directly_manages = L2Reportees.pid WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") GROUP BY directReportees ) AS T GROUP BY directReportees) UNION (SELECT T.directReportees AS directReportees, sum(T.count) AS count FROM( SELECT reportee.directly_manages AS directReportees, 0 AS count FROM person_reportee manager JOIN person_reportee reportee ON manager.directly_manages = reportee.pid WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") GROUP BY directReportees UNION SELECT L2Reportees.pid AS directReportees, count(L2Reportees.directly_manages) AS count FROM person_reportee manager JOIN person_reportee L1Reportees ON manager.directly_manages = L1Reportees.pid JOIN person_reportee L2Reportees ON L1Reportees.directly_manages = L2Reportees.pid WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") GROUP BY directReportees ) AS T GROUP BY directReportees) UNION (SELECT L2Reportees.directly_manages AS directReportees, 0 AS count FROM person_reportee manager JOIN person_reportee L1Reportees ON manager.directly_manages = L1Reportees.pid JOIN person_reportee L2Reportees ON L1Reportees.directly_manages = L2Reportees.pid WHERE manager.pid = (SELECT id FROM person WHERE name = "fName lName") ) ! *“Find all direct reports and how many they manage, up to 3 levels down”

Experiencing Query Pain Same Query*, using Cypher MATCH  (boss)-­‐[:MANAGES*0..3]-­‐>(sub),              (sub)-­‐[:MANAGES*1..3]-­‐>(report)   WHERE  boss.name  =  “John  Doe”   RETURN  sub.name  AS  Subordinate,  count(report)  AS  Total *“Find all direct reports and how many they manage, up to 3 levels down”

Add a comment

Related presentations

Related pages

Webinar: The Five Graphs of Love - Neo4j Graph Database

Keywords: 5 Graphs of Love • Graph Databases • iDating • neo4j • online dating. Leave a Reply Cancel reply. Your email address will not be published.
Read more

Graphs to Know and Love - Cool Math

Graphs to Know and Love. Actually, it's pretty dang cool. (cough ... This section has all the main graphs that pop up over and over in Calculus texts...
Read more

35 Extremely Funny Graphs and Charts | Bored Panda

35 Extremely Funny Graphs and Charts. ... GraphJam is the unholy love child of bored office workers, ... KatherineGarcia 5 months ago.
Read more

Standards for online graphs - governance, accessibility ...

Standards for online graphs. ... I'd love to hear from others who have started thinking about standards for online graphs.
Read more

Describing graphs | Learn English

Describing graphs Average: 3.9 (87 votes ... Now match the graphs to the correct definitions by using the numbers of each graph: ... 5: rameshprabhu ...
Read more

" heart circle infographic. Template for love cycle ...

Template for love cycle diagram, graph, presentation, round chart. Business concept with 4 options, parts, ... (bis zu Pixel bei 5.000 x 5.000 DPI) ...
Read more

Graphs To Know and Love - Cool Math

Graphs to Know and Love. So far, ... I'm sure you'll be thrilled to know that there are other cool graphs to work with! (I know I am ...
Read more

Easy Plotting: Graphs of Functions - MuPAD - MATLAB

Easy Plotting: Graphs of Functions; On this page; ... The distance between labeled ticks is set to 0.5 along the x axis and to 0.2 along the y axis via ...
Read more