O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Recommendations with Neo4j

3.984 visualizações

Publicada em

Graph Databases are naturally well-suited for building recommendation engines. In this talk, Michal will share his experience building a number of high-performance production-ready recommendation engines using Neo4j and introduce the open-source GraphAware Recommendation Engine Library, which enables Java developers to rapidly build their own recommender systems.

This presentation starts by a brief explanation of why graphs are a suitable data model for building recommender systems. A summary of typical recommendation engine requirements follows, including the business and technical challenges these requirements introduce. Afterwards, the talk dives into possible solutions of these challenges, both from business and architectural/design perspectives, and introduces the GraphAware Recommendation Engine Library.

What follows is a demonstration of how this open-source recommendation engine skeleton solves many of the issues and how it handles the "plumbing", so that developers can focus on expressing the business logic specific to their domain.

The talk concludes by presenting complexities yet to be solved, and a brief survey of alternative approaches.

A majority of examples in this talk are drawn from real-world use cases and the speaker's personal experience building recommendation engines. Attendees should have a very basic understanding of graph theory. Prior experience with Neo4j and the Cypher query language is a plus, but not necessary. Ability to read Java is recommended.

Attendees will learn: * what is a recommendation engine and what it is good for * why graphs are a good fit for building one * what business and technical challenges one faces building a recommender * what possible solutions there are for these challenges * how to build a high-performance graph-based recommendation engine in minutes * real-world case studies

Publicada em: Software
  • Seja o primeiro a comentar

Recommendations with Neo4j

  1. 1. GraphAware TM by Michal Bachman Building a high-performance recommendation engine Recommendations with Neo4j
  2. 2. GraphAware TM Quick Intro Why Graphs? Business and Technical Challenges GraphAware Recommendation Engine About this Talk
  3. 3. GraphAware TM News you should read Books you should buy People you may know People you should date People you should market a product to … Recommendation Engines
  4. 4. GraphAware TM Content-based (features) Collaborative filtering (user <-> item relationships) Recommendation Engines
  5. 5. GraphAware TM Features as well as relationships can be naturally represented as a graph. Good News
  6. 6. GraphAware TM Example IS_OF_GENRE title: “Love Actually” Movie name: “Bob” User name: “Comedy” Genre RATED rating: 5 name: “Alice” User name: “Romance” Genre title: “American Pie” Movie IS_OF_GENRE IS_OF_GENRE RATEDrating: 5 INTERESTED_IN rating: 5 RATED
  7. 7. GraphAware TM Easy to understand Natural to model Flexible (schema-free) Fast to query Graphs (Neo4j)
  8. 8. GraphAware TM Great for a quick PoC Great for smaller data sets Great for relatively simple logic Cypher
  9. 9. GraphAware TM Great for a quick PoC Great for smaller data sets Great for relatively simple logic Cypher
  10. 10. GraphAware TM Requirements of real-world recommendation engines are often much more complex. The Reality
  11. 11. GraphAware TM Imagine you’re building the ”people you may know” feature on LinkedIn. Example
  12. 12. GraphAware TM After a brainstorming session, your team came up with the following ways of finding people one may know: Example
  13. 13. GraphAware TM Common contacts Facebook friends in common Email / mobile contacts in common Each others email / mobile contact Worked for the same company Studied at the same school Share the same interest Live in the same city … People you may know
  14. 14. GraphAware TM But that’s just the beginning! Let’s go back and re- visit. Example
  15. 15. GraphAware TM More contacts in common = better chance of knowing each other? Same city / school / company = does size matter? location? What about emails / numbers that don’t represent a person? What about people already connected? And pending… And rejected… And repeatedly ignored… People you may know
  16. 16. GraphAware TM Finding things to recommend Serving the most relevant recommendations Measuring the quality of recommendations Time to market / cost of development Business Challenges
  17. 17. GraphAware TM Performance (real-time!) Simplicity Flexibility Technical Challenges
  18. 18. GraphAware TM So we came up with an open-source recommendation engine skeleton that will help you solve all the challenges. We’ve done it a few times
  19. 19. GraphAware TM plugin to Neo4j (uses GraphAware Framework) you have to use a JVM-language opinionated architecture very fast very flexible handles all the plumbing GraphAware Recommendation Engine
  20. 20. GraphAware TM One “engine” per recommendation “reason” (core logic) Engine executes a graph traversal to find items Engines are assembled into higher-level engines Design Decisions
  21. 21. GraphAware TM Example IS_OF_GENRE title: “Love Actually” Movie name: “Bob” User name: “Comedy” Genre RATED rating: 5 name: “Alice” User name: “Romance” Genre title: “American Pie” Movie IS_OF_GENRE IS_OF_GENRE RATEDrating: 5 INTERESTED_IN rating: 5 RATED
  22. 22. GraphAware TM One “engine” per recommendation “reason” (core logic) Engine executes a graph traversal to find items Engines are assembled to higher-level engines Items discovered multiple times are more relevant Relevance depends on how the item was discovered Design Decisions
  23. 23. GraphAware TM Example IS_OF_GENRE title: “Love Actually” Movie name: “Bob” User name: “Comedy” Genre RATED rating: 5 name: “Alice” User name: “Romance” Genre title: “American Pie” Movie IS_OF_GENRE IS_OF_GENRE RATEDrating: 5 INTERESTED_IN rating: 5 RATED
  24. 24. GraphAware TM One “engine” per recommendation “reason” (core logic) Engine executes a graph traversal to find items Engines are assembled to higher-level engines Items discovered multiple times are more relevant Relevance depends on how the item was discovered Items that should not be recommended is a “cross-cutting” concern Design Decisions
  25. 25. GraphAware TM Example IS_OF_GENRE title: “Love Actually” Movie name: “Bob” User name: “Comedy” Genre RATED rating: 5 name: “Alice” User name: “Romance” Genre title: “American Pie” Movie IS_OF_GENRE IS_OF_GENRE RATEDrating: 5 INTERESTED_IN rating: 5 RATED
  26. 26. GraphAware TM Input -> Engine -> Recommendations Scores and Score Transformers Blacklists Filters Post-processors Context (how many, how fast,…?) Architecture
  27. 27. GraphAware TM In 5 minutes, we’ll build a simple engine that recommends who you should be friends with. Let’s Build Something
  28. 28. GraphAware TM Model
  29. 29. GraphAware TM (1) Discover
  30. 30. GraphAware TM (2) Score
  31. 31. GraphAware TM (2) Score
  32. 32. GraphAware TM (3) Post-Process
  33. 33. GraphAware TM (3) Post-Process
  34. 34. GraphAware TM (4) Filter
  35. 35. GraphAware TM (5) Assemble
  36. 36. GraphAware TM (5) Assemble
  37. 37. GraphAware TM (6) Test
  38. 38. GraphAware TM Finding things to recommend Serving the most relevant recommendations Measuring the quality of recommendations Time to market / cost of development Business Challenges
  39. 39. GraphAware TM Performance (real-time!) Simplicity Flexibility Technical Challenges
  40. 40. GraphAware TM Getting Started
  41. 41. GraphAware TM Built-in capability to pre-compute recommendations Other built-in base-classes But we need your help! https://github.com/graphaware/neo4j-reco There’s more!
  42. 42. GraphAware TM GraphAware Framework makes it easy to build, test, and deploy generic as well as domain-specific functionality for Neo4j. GraphAware Framework
  43. 43. GraphAware TM GraphUnit
 & RestTest RelCount WarmUp Schema (wip) Recommendation Engine GraphAware Framework ChangeFeed UUID TimeTree Algorithms NodeRank
  44. 44. GraphAware TM Open Source (GPL) Active Production Ready Github: github.com/graphaware Our Web: graphaware.com Maven Central GraphAware Framework
  45. 45. GraphAware TM Try it Give us feedback Contribute Build your own modules Get in touch for support / consultancy GraphAware Framework
  46. 46. GraphAware TM GraphAware Events 19
 Jan Recommendation Engines in Berlin (Meetup) 19
 Jan BEER TONIGHT! 31
 Jan Recommendation Engines in Brussels (FOSDEM) 31
 Jan GraphGen in Brussels (FOSDEM) 5
 Feb Recommendation Engines Webinar 5
 Feb Meetup at GraphAware (build your own Recommendation Engine) 10
 Feb Neo4j Fundamentals in Manchester 17
 Feb Neo4j Fundamentals in Edinburgh
  47. 47. GraphAware TM GraphConnect Europe 2015 When: Where: Tickets: Call for Papers: Sponsors: Thursday, 7th May, 2015 - main Conference Day Wednesday, 6th May 2015 - Training Day Etc venues, 155 Bishopsgate, London (next to Liverpool Street Station) now available on www.graphconnect.com 199$ early bird plus 100$ for training 499$ full price plus 100$ for training open now till 29th January all Neo4j community members, customers or general graph enthusiasts are invited to submit their talk open now till 29th January, email: gceurope@neotechnology.com
  48. 48. GraphAware TM www.graphaware.com @graph_aware @bachmanm Thank You!

×