communicability computes the scale communicability between nodes (rows) in a hierarchical block matrix
hm, generated with
a hierarchical block matrix computed with
The communicability of an adjacency matrix
A can be expressed as e^A (Estrada et al., 2012), so that the i,j-th entry is a weighted sum of all paths from i to j, where shortest paths are assigned with larger weights. For a hierarchical block matrix, computed with
hbm, each scale
s defines its own adjacency matrix, where all entries with values larger than s are set to 0. The scale-communicability between 2 nodes i and j in this matrix is defined here as the mean communicability across scales (excluding the largest scale).
communicability returns a matrix of the same dimensions as
hm, where the (i,j)-th entry gives the scale-communicability between i and j in
Estrada, E., Hatano, N. and Benzi, M. The physics of communicability in complex networks. Physics Reports 514, 89-119 (2012).
hbm's website: http://www.cl.cam.ac.uk/~ys388/hbm/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
set.seed(2) n = 100 # chain size conf = generate.random.conf(n, scale = FALSE) # compute the HBM hm.control = hbm(exp(-1*as.matrix(dist(conf))), 2)$hm # compute scale communicability comm = communicability(hm.control) # explore for position 50 plot(1:n, comm[50,], xlab = "Position", ylab = "Communicability", main = "Communicability for Position 50", pch=16) # plot in original configuration cols = rep("black", n) cols[which(comm[50,] > 100)] = "blue" plot(conf, xlab = "X", ylab = "Y", type = "n") text(conf, labels = 1:n, col = cols)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.