Closeness centrality (Sabidussi 1966) is the reciprocal of the total
shortest-path distance from a node to the nodes it reaches:
$$C(v) = \frac{1}{\sum_{w \ne v} d(v, w)}.$$
Unreachable nodes are left out of the sum, as in
igraph::closeness().
Usage
centrality_closeness(x, mode = "all", ...)
centrality_incloseness(x, ...)
centrality_outcloseness(x, ...)Arguments
- x
Network input accepted by
centrality.- mode
For directed networks:
"all"(default),"out"or"in".- ...
Further arguments to
centrality. The measure usesinvert_weights(defaultNULL, which isTRUEfor tna input),alpha(inversion exponent, default 1),cutoff(largest path length considered, default -1 for no limit) andnormalized(defaultFALSE).
Details
Edge weights are read as path lengths, and invert_weights = TRUE
uses \(1/w^\alpha\) instead. weighted = FALSE uses
hop counts. mode = "out" follows paths
leaving the node and mode = "in" paths arriving at it.
centrality_outcloseness() and centrality_incloseness() are
these two forms. A node that reaches no other node returns NaN.
normalized = TRUE multiplies each score by the number of other
nodes the node reaches, as igraph does.
References
Sabidussi, G. (1966). The centrality index of a graph. Psychometrika, 31(4), 581-603. doi:10.1007/BF02289527 .
