Book Image

Hands-On Graph Analytics with Neo4j

By : Estelle Scifo
Book Image

Hands-On Graph Analytics with Neo4j

By: Estelle Scifo

Overview of this book

Neo4j is a graph database that includes plugins to run complex graph algorithms. The book starts with an introduction to the basics of graph analytics, the Cypher query language, and graph architecture components, and helps you to understand why enterprises have started to adopt graph analytics within their organizations. You’ll find out how to implement Neo4j algorithms and techniques and explore various graph analytics methods to reveal complex relationships in your data. You’ll be able to implement graph analytics catering to different domains such as fraud detection, graph-based search, recommendation systems, social networking, and data management. You’ll also learn how to store data in graph databases and extract valuable insights from it. As you become well-versed with the techniques, you’ll discover graph machine learning in order to address simple to complex challenges using Neo4j. You will also understand how to use graph data in a machine learning model in order to make predictions based on your data. Finally, you’ll get to grips with structuring a web application for production using Neo4j. By the end of this book, you’ll not only be able to harness the power of graphs to handle a broad range of problem areas, but you’ll also have learned how to use Neo4j efficiently to identify complex relationships in your data.
Table of Contents (18 chapters)
1
Section 1: Graph Modeling with Neo4j
5
Section 2: Graph Algorithms
10
Section 3: Machine Learning on Graphs
14
Section 4: Neo4j for Production

What this book covers

Chapter 1, Graph Databases, provides a review of graph database concepts, starting from graph theory and important definitions to the node and relationship model of Neo4j.

Chapter 2, The Cypher Query Language, covers the basics of Cypher, the query language used by Neo4j, which will be used throughout this book for data import and pattern matching. APOC utilities for data import are also studied. In this chapter, we will start building the graph of Neo4j contributors on GitHub, which will be used elsewhere in this book.

Chapter 3, Empowering Your Business with Pure Cypher, explains how to build a knowledge graph from structured and unstructured data (using NLP) and start applying it from graph-based search or recommendation engines. We will use the graph of Neo4j contributors on GitHub and extend this thanks to natural language analysis and external publicly available knowledge graphs (namely, Wikidata).

Chapter 4, The Graph Data Science Library and Path Finding, explains the main principles of the graph data science plugin for Neo4j and uses our first algorithms with the shortest path-finding applications.

Chapter 5, Spatial Data, explains how, thanks to the Neo4j Spatial plugin, we will be able to store and query spatial data (points, lines, and polygons). Coupling Neo4j Spatial with the graph data science plugin, we will create a routing engine in Manhattan, New York.

Chapter 6, Node Importance, covers the different centrality algorithms, depending on how you define node importance, their applications, and usage from the GDS.

Chapter 7, Community Detection and Similarity Measures, covers the different algorithms to detect structures in a graph and how to visualize them using JavaScript libraries.

Chapter 8, Using Graph-Based Features in Machine Learning, explains how, starting from a flat CSV file, we will build a full machine learning project, reviewing the different steps required to build a predictive pipeline (feature engineering, model training, and model evaluation). We will then transform our flat CSV data to a graph using extra knowledge of our data and learn how graph algorithms can enhance the performance of a classification task.

Chapter 9, Predicting Relationships, explains how, in a time-evolving graph, we will formulate a link prediction problem as a machine learning problem with a training and test set.

Chapter 10, Graph Embedding – from Graphs to Matrices, explains how algorithms can automatically learn features for each node in a graph. Using an analogy with word embedding, we will learn how the DeepWalk algorithm works. We will then go even deeper and learn about graph neural networks and their use cases. Applications will be given using both Python and some dependencies and the GDS implementation of node2vec and GraphSAGE.

Chapter 11, Using Neo4j in Your Web Application, covers how, in order to use Neo4j and the tools we have studied in the previous chapter in a live application, we will create a web application using either Python and its popular Flask framework, or JavaScript and a GraphQL API.

Chapter 12, Neo4j at Scale, provides an overview of the possibilities offered by the GDS and Neo4j 4 in order to manage big data.