powered by
Based on an image matrix and a partition it calculate the density of a whole network.
globalDensity(M, partition)
Density of a whole network (a single value).
Image matrix with block densities.
A partition in a vector format. Each unique value (positive integers) represents one cluster.
Marjan Cugmas
M <- matrix(c(0.1, 0.4, 0.5, 0.3), nrow = 2) partition <- c(1, 2, 2, 1, 1, 2, 2, 2, 1) globalDensity(M = M, partition = partition)
Run the code above in your browser using DataLab