liveBook · Manning

GDS library

As explained in Graph Algorithms for Data Science

The Neo4j Graph Data Science library is a software library providing graph algorithms, graph projections, and analytical capabilities for Neo4j graph data.

The Neo4j Graph Data Science (GDS) library is a Neo4j plugin for graph analysis. It provides more than 50 algorithms, including community detection, centrality, node embedding, and link prediction, for questions such as how connected a network is, which nodes are influential, and where tightly connected groups occur. section 5.2 section 5.1

GDS algorithms run on a projected in-memory graph rather than directly on the stored database graph. This separate, optimized structure supports scalable parallel execution and lets an analysis use only the nodes, relationships, and properties relevant to a question. section 5.2

Figure 5.8 Graph Data Science library workflow
05-08

Use this workflow diagram to follow the path from database data through an in-memory projection to graph-algorithm results. section 5.2

A typical GDS workflow is:

  • Project a subgraph into memory and give it a graph name. section 5.2 section 5.2.1
  • Run one or more algorithms against that named graph. section 5.2
  • Choose how results are handled: stream records, return statistics, mutate the in-memory graph, or write results to the database. section 5.6
  • Release the projected graph from memory when analysis is complete. section 5.6

Native projection selects data by node labels and relationship types and is the preferred high-performance option because it reads directly from Neo4j storage. Cypher projection can select or filter a more specific subgraph, but is slower and better suited to exploration. section 5.2

Project a follower network

Create a named in-memory graph from User nodes and FOLLOWS relationships with `CALL gds.graph.project('follower-network', 'User', 'FOLLOWS')`. The name identifies the projection for later algorithm calls; relationships are included only when both adjacent nodes are part of the node projection. section 5.2.1

For a follower network, GDS supports topology-focused analysis: connected-component algorithms identify disconnected parts, clustering measures describe local interconnectedness, and PageRank highlights nodes with influence over information flow. These outputs help characterize network structure before deeper investigation. section 5.3 section 5.6

How Graph Algorithms for Data Science covers it

How deep it goes
Explains projection choices, graph-catalog reuse, procedure parameters, execution modes, and cleanup; defers multi-label projections and weighted properties.
Examples
Demonstrates projecting User nodes and FOLLOWS relationships as a named follower network for later analysis.
What it assumes
Introduces GDS projection and procedure syntax from zero while using Cypher CALL clauses and node-label and relationship-type selections.
What you can do after
Apply it via Neo4j GDS procedures to project named graphs, run algorithms, select result modes, and release memory.
How it connects
Connects graph projection and graph catalog to community detection, centrality, connected components, clustering coefficient, and PageRank.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Graph Algorithms for Data Science. The section links point to the parts of the book it draws on.