View source: R/centrality-batch7.R
| centrality_distance_entropy | R Documentation |
Shannon entropy of the distribution of hop distances from a node to every node it can reach (Stella & De Domenico 2018), normalized so that a uniform spread over the node's distance range scores 1:
h(i) = -\frac{1}{\log(M_i - m_i + 1)} \sum_{k = m_i}^{M_i}
p_k^{(i)} \log p_k^{(i)}, \qquad p_k^{(i)} = n_k^{(i)} / R_i,
where n_k^{(i)} is the number of nodes at distance k from
i, R_i the number of reachable nodes, and m_i, M_i the
minimum and maximum distance. High values mark nodes whose reach is
spread evenly across many network layers; a node whose reachable nodes
all sit at one distance scores 0. Closeness summarizes the mean of the
same distribution; distance entropy summarizes its spread.
centrality_distance_entropy(x, mode = "all", ...)
x |
Network input (matrix, igraph, network, cograph_network, tna object). |
mode |
For directed networks: |
... |
Additional arguments passed to |
Distances are hop counts (edge weights are ignored). The original paper
normalizes by \log(M_i - m_i), which is undefined when only two
distinct distances occur; \log(M_i - m_i + 1) is used here so the
index is bounded by 1 for a uniform distribution.
Named numeric vector, one value per node, in [0, 1].
NaN for a node that reaches no other node.
Stella, M., & De Domenico, M. (2018). Distance entropy cartography characterises centrality in complex networks. Entropy, 20(4), 268.
centrality for computing multiple measures at once,
centrality_local_dimension for the growth-rate view of the
same distance profile.
path4 <- matrix(c(0,1,0,0, 1,0,1,0, 0,1,0,1, 0,0,1,0), 4, 4)
rownames(path4) <- colnames(path4) <- c("A", "B", "C", "D")
centrality_distance_entropy(path4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.