liveBook · Manning

Degree centrality

As explained in Graph Algorithms for Data Science

Degree centrality measures a node's importance by counting its incident relationships, optionally accounting for orientation and relationship weights.

Degree centrality measures a node’s importance by counting its relationships. Higher counts indicate greater connectivity or influence; directed graphs distinguish incoming from outgoing relationships. section 5.1 section 6.2.1

Apply degree centrality to inspect connectivity and compare node roles:

  • Use gds.degree in stats mode to examine a node degree distribution and assess whether a network is sparse. section 6.2.1
  • Use stream mode to return the highest-scoring nodes without storing results in the database or projected graph. section 6.2.1
  • Calculate out-degree by default; use orientation:'REVERSE' to examine in-degree, counting incoming links instead. section 6.2.1
  • Pass relationshipWeightProperty:'weight' to calculate weighted degree, incorporating relationship weights into the distribution. section 6.2.1

Retweet amplification network

Run CALL gds.degree.stats('amplify') YIELD centralityDistribution to inspect out-degree. In the example network, the mean out-degree is about 1.5, while user textsla has the highest out-degree at 146. Weighted analysis raises the mean to about 4.7, and reverse orientation identifies Paula_Piccard as the highest in-degree user with 117. section 6.2.1

Listing 6.4 Evaluating the out-degree distribution of the inferred retweet amplification network
CALL gds.degree.stats('amplify')
YIELD centralityDistribution

Inspect the executable degree-statistics query alongside distribution tables for unweighted, weighted, and reversed orientations. section 6.2.1

How Graph Algorithms for Data Science covers it

How deep it goes
Explains counts, orientation, weighting, distributions, and GDS execution, but does not develop the algorithm’s internal computation.
Examples
Uses friendship networks and a retweet amplification network with degree distributions, top-five users, Cypher calls, and weighted results.
What it assumes
Assumes familiarity with graph nodes, relationships, and projected graphs while explaining degree orientation and weighting directly.
What you can do after
Operate the GDS degree algorithm to calculate, orient, weight, summarize, and rank node degrees.
How it connects
Connects degree centrality with centrality measures, betweenness centrality, community detection, graph projection, and relationship weights.

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.