liveBook · Manning

Betweenness centrality

As explained in Graph Algorithms for Data Science

A betweenness centrality algorithm computes how frequently each node lies on shortest paths between other nodes.

Betweenness centrality measures how often a node lies on shortest paths between other nodes. A high score identifies a bridge between communities and a potential gatekeeper of information flow. section 5.1 section 8.1.2

Use the measure to interpret network structure and implement it in a projected Neo4j graph:

  • Nodes connecting otherwise separate communities receive higher ranks because more shortest paths pass through them. section 8.1.2
  • Removing a high-betweenness node can split a network into separate components, revealing its structural importance. section 5.1 section 8.1.2
  • Project the follower network as an in-memory graph, retain the previously calculated node features, and run the algorithm in mutate mode. section 8.1.2

Running the algorithm

With the projected graph named knnExample, execute CALL gds.betweenness.mutate('knnExample', {mutateProperty:'betweenness'}). The result stores each node's score in the projected graph under betweenness.

How Graph Algorithms for Data Science covers it

How deep it goes
Defines shortest-path ranking, illustrates bridge consequences, and demonstrates Neo4j projection and mutation without discussing algorithm internals.
Examples
Uses Twitter follower communities, Ganesh, Ljubica, Jack, and Marvel characters including Captain America and Beast.
What it assumes
Requires a Neo4j database with imported Twitter data, a projected in-memory graph, and previously calculated node features.
What you can do after
Apply it via Neo4j Graph Data Science after projecting an in-memory graph and storing scores with mutate mode.
How it connects
Connects shortest paths, community structure, information flow, node features, and nearest neighbor graphs.

Also explained in

Compare how 3 books explain betweenness centrality →

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.