Betweenness is another way to measure centrality. Instead of summing the distances, we are now counting the number of shortest paths traversing a given node:
Cn = ∑ σ(u, v | n) / ∑ σ(u, v)
Here, σ(u, v) is the number of shortest paths between u and v, and σ(u, v | n) is the number of such paths passing through n.
This measure is particularly useful for identifying critical nodes in a network, such as bridges in a road network.
It is used in the following way with GDS:
CALL gds.alpha.betweenness.stream("projected_graph", {})
YIELD nodeId, centrality as score
RETURN gds.util.asNode(nodeId).name, score
ORDER BY score DESC
If you are using GDS ≥ 1.3, then the betweenness centrality procedures have been moved to the production tier and are hence named
gds.betweenness.stream and gds.betweenness.write.
gds.betweenness.stream and gds.betweenness.write.
You can check which version of GDS you are using with the RETURN gds.version() Cypher code.
Here are the sorted...