Hands-On Graph Analytics with Neo4j
eBook - ePub

Hands-On Graph Analytics with Neo4j

Perform graph processing and visualization techniques using connected data across your enterprise

Estelle Scifo

Compartir libro
  1. 510 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Hands-On Graph Analytics with Neo4j

Perform graph processing and visualization techniques using connected data across your enterprise

Estelle Scifo

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

Discover how to use Neo4j to identify relationships within complex and large graph datasets using graph modeling, graph algorithms, and machine learning

Key Features

  • Get up and running with graph analytics with the help of real-world examples
  • Explore various use cases such as fraud detection, graph-based search, and recommendation systems
  • Get to grips with the Graph Data Science library with the help of examples, and use Neo4j in the cloud for effective application scaling

Book Description

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.

What you will learn

  • Become well-versed with Neo4j graph database building blocks, nodes, and relationships
  • Discover how to create, update, and delete nodes and relationships using Cypher querying
  • Use graphs to improve web search and recommendations
  • Understand graph algorithms such as pathfinding, spatial search, centrality, and community detection
  • Find out different steps to integrate graphs in a normal machine learning pipeline
  • Formulate a link prediction problem in the context of machine learning
  • Implement graph embedding algorithms such as DeepWalk, and use them in Neo4j graphs

Who this book is for

This book is for data analysts, business analysts, graph analysts, and database developers looking to store and process graph data to reveal key data insights. This book will also appeal to data scientists who want to build intelligent graph applications catering to different domains. Some experience with Neo4j is required.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Hands-On Graph Analytics with Neo4j un PDF/ePUB en línea?
Sí, puedes acceder a Hands-On Graph Analytics with Neo4j de Estelle Scifo en formato PDF o ePUB, así como a otros libros populares de Computer Science y Databases. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2020
ISBN
9781839215667
Edición
1
Categoría
Databases
Section 1: Graph Modeling with Neo4j
This part will review the basics of Neo4j and Cypher needed for this book. We will then explore a classic application of graph modeling: recommendation engines.
This section consists of the following chapters:
  • Chapter 1, Graph Databases
  • Chapter 2, The Cypher Query Language
  • Chapter 3, Empowering Your Business with Pure Cypher
Graph Databases
Graph databases have gained increasing attention in the last few years. Data models built from graphs bring together the simplicity of document-oriented databases and the clarity of SQL tables. Among others, Neo4j is a database that comes with a large ecosystem, including the database, but also tools to build web applications, such as the GRANDstack, and tools to use graph data in a machine learning pipeline, as well as the Graph Data Science Library. This book will discuss those tools, but let's first start from the beginning.
Talking about graph databases means talking about graphs. Even if you do not need to know all the details about graph theory, it’s always a good idea to learn some of the basic concepts underlying the tool you are using. In this chapter, we will start by defining graphs and giving some simple and less simple examples of graphs and their applications. We will then see how to move from the well-known SQL tables to graph data modeling. We’ll conclude by introducing Neo4j and its building blocks, and review some design principles to understand what can and can’t be done with Neo4j.
This chapter will cover the following topics:
  • Graph definition and examples
  • Moving from SQL to graph databases
  • Neo4j: the nodes, relationships, and properties model
  • Understanding graph properties
  • Considerations for graph modeling in Neo4j

Graph definition and examples

The question you may ask at this point is "Why should I care about graphs? After all, my company/business/interest is not about graphs or networks of any kind. I know my data model, well arranged into SQL tables or NoSQL documents, and I can retrieve the information I want when I want." This book will teach you how to empower your data by looking at it in a different way. Surprisingly enough, graphs can be used to model a lot of processes, from the more obvious ones such as road networks, to less intuitive use cases such as video games or credit card fraud detection, among many others.

Graph theory

Let's start from the beginning and answer the question "What is a graph?"

A bit of history: the Seven Bridges of Königsberg problem

Graph studies originate back to Leonhard Euler, a prolific Swiss mathematician who lived in the eighteenth century. In 1735, he published a paper proposing a solution to the Seven Bridges of Königsberg problem. The problem is the following:
Given the city whose geography is depicted in the following image, is there a way to walk across each of the seven bridges of the city once and only once, and return to our starting point?
As you can see, this city is crossed by a river that splits the city into two banks, A and B. The river meander additionally creates two islands, C and D, also part of the city. Those two banks and two islands are connected by a total of seven bridges: two bridges between A and C, two other bridges between C and B, one between C and D, one between B and D, and a last one between D and A:
Euler's reasoning (on the right side) was to reduce this complex geography to the most simple drawing, like the one you can see on the right of the previous image, since the route used within each island is not relevant. Each island then becomes a single point, or node, connected to another by one or several links, or edges, representing the bridges.
With this simple visualization, the mathematician was able to solve the initial problem by noting that, if you arrive at an island (vertex) via one bridge, you will need to leave it using another bridge (except for the start and end vertices). In other words, all vertices but two need to be connected to an even number of relationships. This is not the case in the Königsberg graph, since we have the following:
A: 3 connections (to C twice, and to D once)
B: 3 connections (to C twice, and to D once)
C: 5 connections (to A twice, to B twice and to D once)
D: 3 connections (to A once, to C once and to D once)
This kind of path, where each edge is used once and only once, is called a Eulerian cycle and it can be said that a graph has a Eulerian cycle if and only if all of its vertices have even degrees.
The number of connections for a node is called the degree of the node.

Graph definition

This leads us to the mathematical definition of a graph:
A graph G = (V, E) is a pair of:
  • V, a set of nodes or vertices: the islands in our previous example
  • E, a set of edges connecting nodes: the bridges
The Königsberg graph illustrated on the right of the preceding image can then be defined as follows:
V = [A, B, C, D]
E = [
(A, C),
(A, C),
(C, B),
(C, B),
(A, D),
(C, D),
(B, D)
]
Graphs, like many mathematical objects, are well defined. While it can be difficult to find a good visualization for some of those objects, graphs, on the other hand, suffer from the almost infinite number of ways to draw them.

Visualization

Apart from very special cases, there is no single way to draw a graph and visualize it. Indeed, graphs are most often an abstract representation of reality. For instance, all four graphs depicted in the following image represent the exact same set of nodes and edges, so, by definition, the same mathematical graph:
We cannot rely only on our eyes to find patterns within graphs. For instance, looking only at the lower-right plot, it would be impossible to see the pattern that is visible in the upper-right plot. That's where graph algorithms enter into the game, which will be discussed in more detail in Chapter 6, Node Importance, and Chapter 7, Community Detection and Similarity Measures.

Examples of graphs

Now that we have a better idea of what a graph is, it's time to discover some more examples to understand which purposes graphs can be useful for.

Networks

With the graph definition in mind (a set of nodes connected to each other via edges) and the bridges example from the last section, we can easily imagine ho...

Índice