Building a real-time recommendation engine with Neo4j OSCON 2017 - - PowerPoint PPT Presentation

building a real time recommendation engine with neo4j
SMART_READER_LITE
LIVE PREVIEW

Building a real-time recommendation engine with Neo4j OSCON 2017 - - PowerPoint PPT Presentation

Building a real-time recommendation engine with Neo4j OSCON 2017 William Lyon @lyonwj William Lyon Developer Relations Engineer @neo4j will@neo4j.com @lyonwj lyonwj.com Agenda Use cases Recommender systems


slide-1
SLIDE 1

OSCON 2017 William Lyon @lyonwj

Building a real-time recommendation engine with Neo4j

slide-2
SLIDE 2

William Lyon

Developer Relations Engineer @neo4j will@neo4j.com @lyonwj lyonwj.com

slide-3
SLIDE 3

Agenda

  • Use cases
  • Recommender systems
  • Hands-on!
  • Graph data modeling
  • Cypher
slide-4
SLIDE 4

Neo4j

Graph Database

slide-5
SLIDE 5

Graph Data Model

slide-6
SLIDE 6

Labeled Property Graph Model

slide-7
SLIDE 7

Labeled Property Graph Model

slide-8
SLIDE 8

The Graph

slide-9
SLIDE 9

The Graph

slide-10
SLIDE 10

The Graph

slide-11
SLIDE 11

The Graph

slide-12
SLIDE 12

The Graph

slide-13
SLIDE 13
slide-14
SLIDE 14
  • penCypher

(queryLanguage)-[:FOR]->(graphs)

slide-15
SLIDE 15

Cypher

slide-16
SLIDE 16
slide-17
SLIDE 17
slide-18
SLIDE 18

Use Case: Personalized Recommendations

slide-19
SLIDE 19
slide-20
SLIDE 20
slide-21
SLIDE 21

Personalized Promotions Personalized Real-Time Recommendations Personalized Real-Time Recommendations

slide-22
SLIDE 22

Data-Model

(Expressed as

a graph)

Category Category

Product Product Product

Collaborative Filtering

An algorithm that considers users interactions with products, with the assumption that other users will behave in similar ways. Algorithm Types

Content Based

An algorithm that considers similarities between products and categories of products.

Customer Customer

Product Product Product

slide-23
SLIDE 23

Purchases

RELATIONAL DB WIDE COLUMN STORE

Views

DOCUMENT STORE

User Review

RELATIONAL DB

In-Store Purchase Shopping Cart

KEY VALUE STORE

Product Catalogue

DOCUMENT STORE

Category Price Configurations Location

Polyglot Persistence

Purchase View Review Return In-store Purchases Inventory Location Category Price Configurations Location Purchase View Review Return In-store Purchases Inventory

Products Customers / Users

Location

slide-24
SLIDE 24

Data Lake

Purchases

RELATIONAL DB

Product Catalogue

DOCUMENT STORE WIDE COLUMN STORE

Views

DOCUMENT STORE

User Review

RELATIONAL DB

In-Store Purchase Shopping Cart

KEY VALUE STORE

Recommendations require an operational workload — it’s in the moment, real-time!

Good for Analytics, BI, Map Reduce Non-Operational, Slow Queries

slide-25
SLIDE 25

Purchases

RELATIONAL DB

Product Catalogue

DOCUMENT STORE WIDE COLUMN STORE

Views

DOCUMENT STORE

User Review

RELATIONAL DB

In-Store Purchase Shopping Cart

KEY VALUE STORE

Connector Drivers: Java | JavaScript | Python | .Net | PHP | Go | Ruby Apps and Systems

Real-Time Queries

slide-26
SLIDE 26

Graph-based recommendations

slide-27
SLIDE 27
slide-28
SLIDE 28

Collaborative Filtering

slide-29
SLIDE 29

Collaborative Filtering

slide-30
SLIDE 30

Collaborative Filtering

slide-31
SLIDE 31

Collaborative Filtering

slide-32
SLIDE 32

In Cypher

slide-33
SLIDE 33

In Cypher

slide-34
SLIDE 34

Content Filtering

slide-35
SLIDE 35

Content Filtering

slide-36
SLIDE 36

Content Filtering w/ Cypher

slide-37
SLIDE 37

Content Filtering - Concept Hierarchy

slide-38
SLIDE 38

Content Filtering - Concept Hierarchy

slide-39
SLIDE 39

Content Filtering - Concept Hierarchy

slide-40
SLIDE 40

Content Filtering - Concept Hierarchy w/ Cypher

slide-41
SLIDE 41

Content Filtering - Concept Hierarchy w/ Cypher

slide-42
SLIDE 42

Neo4j Sandbox

slide-43
SLIDE 43
slide-44
SLIDE 44
slide-45
SLIDE 45

○ ○

○ ○

slide-46
SLIDE 46
slide-47
SLIDE 47
slide-48
SLIDE 48
slide-49
SLIDE 49

Click “Neo4j Browser”

slide-50
SLIDE 50

You should see this: Neo4j Browser

  • Query workbench /

visualization for Neo4j

  • Interactive “guides” for
  • ur tutorial today
  • Embed content, queries
slide-51
SLIDE 51

(you)-[:HAVE]->(?) (?)<-[:ANSWERS]-(will)