liveBook · Manning

Stats execution mode

As explained in Graph Algorithms for Data Science

Stats execution mode returns summary statistics of algorithm results without storing the results.

Stats execution mode runs a graph algorithm and returns summary statistics without storing algorithm results in the projected graph or database. It is useful when the goal is to inspect a result distribution rather than retain individual scores. section 5.2

A typical workflow projects a graph into memory, runs an algorithm in stats mode, and reads its summary output. Unlike stream mode, it does not return one record per result; unlike mutate and write modes, it does not persist results. section 5.2 section 5.6

Inspecting an out-degree distribution

CALL gds.degree.stats('amplify') YIELD centralityDistribution returns distribution statistics for the inferred retweet amplification network. The reported mean out-degree is about 1.5, while the percentiles show that most nodes have few outgoing relationships, indicating a sparse network. Add relationshipWeightProperty:'weight' to inspect weighted out-degree, or use orientation:'REVERSE' to inspect in-degree. section 6.2.1

Figure 5.8 Graph Data Science library workflow
05-08

Use the workflow figure to locate stats mode within the broader graph projection and algorithm-execution process. section 5.2

How Graph Algorithms for Data Science covers it

How deep it goes
Defines execution behavior and demonstrates degree, weighted-degree, and reversed-orientation statistics, but stops short of algorithm internals.
Examples
Uses retweet-network degree distributions, weighted out-degree, reversed in-degree, percentile tables, and a gds.degree.stats query.
What it assumes
Assumes a projected in-memory graph and basic graph-algorithm configuration while distinguishing execution modes.
What you can do after
Evaluate degree distributions and interpret network sparsity without storing algorithm scores.
How it connects
Connects projected in-memory graphs with stream mode, mutate mode, write mode, degree centrality, and node degree distribution.

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.