Calculating Node Closeness Centrality in Complex Networks
- Login to Download
- 1 Credits
Resource Overview
Detailed Documentation
In complex network analysis, Closeness Centrality is a key metric for measuring node importance. It represents the reciprocal of the average shortest path length from a node to all other nodes in the network. Higher closeness centrality indicates that the node is closer to other nodes in the network, typically signifying a more central position in information propagation or resource flow.
Steps for Calculating Closeness Centrality
Compute Shortest Paths: First, calculate the shortest paths between all node pairs in the network. Classic algorithms like Dijkstra's algorithm (for weighted networks) or Breadth-First Search (BFS, for unweighted networks) can be employed. The implementation involves iterating through all nodes and storing path distances in a matrix structure. Calculate Average Path Length: For each node, compute the average of its shortest paths to all other reachable nodes. This requires summing path lengths and dividing by the number of connected nodes. Take Reciprocal: Closeness centrality is defined as the reciprocal of this average path length, ensuring higher values indicate greater centrality.
MATLAB Implementation Approach
MATLAB provides `graph` and `digraph` objects for network construction, with built-in `distances` function for shortest path calculations. The implementation workflow includes: Building network graph structure using adjacency matrix or edge list inputs. For example: `G = graph(adjMatrix)` or `G = graph(srcNodes, tarNodes)`. Calling `distances` function to obtain the shortest path matrix: `D = distances(G)` computes all-pairs shortest paths efficiently using optimized algorithms. For each node, calculate average shortest path to other nodes (excluding itself and unreachable nodes). Implementation tip: Use `mean(D(i, [1:i-1 i+1:end]))` while handling NaN values for disconnected nodes. Take reciprocal and optionally normalize: `closeness = 1 ./ averagePaths` with potential normalization by multiplying by (n-1) where n is the number of nodes.
Extended Applications
Closeness centrality applies to social networks, transportation networks, or biological networks to identify critical nodes. For instance, in epidemiological studies, nodes with high closeness centrality may represent super-spreaders; in infrastructure networks, these nodes could be crucial hubs requiring priority protection.
Note: When networks are disconnected, paths between certain nodes may not exist. In such cases, closeness centrality calculation requires modification - either by considering only reachable nodes or using harmonic mean closeness centrality to handle disconnected components properly.
- Login to Download
- 1 Credits