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
