Description Usage Arguments Details Value References See Also Examples
This function calculates the entropy measure used to evaluate the heterogeneity of the nodes' distribution on a certain (intra)layer of the multiplex network.
1 2 3 4 5 | entropyDegree.multiplex(obj,
indexNode = 1:length(nodes.multiplex(obj)),
indexOverlappingLayer = 1:length(layers.multiplex(obj)),
display = FALSE
)
|
obj |
An object of class |
indexNode |
A vector of IDs (or labels) for the selected nodes on which to calculate the entropy measure. Default selects all the nodes of the network. |
indexOverlappingLayer |
A vector of IDs (or labels) for the selected (intra)layers on which to calculate the aggregated overlapping matrix with |
display |
Default is |
Instead of the formula written in Battiston et al. (2014) work, the function has a small correction in the denominator, avoiding NaN
output if the degree is zero.
A numeric vector
with all the entropy measures evaluated on the nodes of the multiplex network (eventually selected with the indexNode
argument).
Battiston et al. (2014) Structural measures for multiplex networks. Phys. Rev. E 89, 032804.
create.multiplex
, aggregatedOverlapping.multiplex
, degree
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | # Loading Aarhus CS Department dataset.
data(aarhus_mplex)
# Creating the multiplex object using the dataset loaded into aarhus_mplex object.
mplexObj <- create.multiplex(nodes = aarhus_mplex$nodes,
layersNames = aarhus_mplex$layerNames,
layer1 = aarhus_mplex$L1,
type1 = "undirected",
aarhus_mplex$L2,
aarhus_mplex$L3,
aarhus_mplex$L4,
aarhus_mplex$L5
)
# Calculating the entropy of the degrees' distribution:
entropyDegree.multiplex(mplexObj)
# Using the 'display = TRUE' option we see that quite all the nodes have an entropy
# measure > 0.80: this mean that they have a similar degree in all the intralayer of the network.
entropyDegree.multiplex(mplexObj, display = TRUE)
# It could be also useful to select just some nodes or levels on which to calculate the
# entropy measure, in order to investigate which layer(s) is (are) causing a low measure
# of entropy for a certain node:
entropyDegree.multiplex(mplexObj,
indexNode = sample(1:length(nodes.multiplex(mplexObj)), 10),
indexOverlappingLayer = (1:5)[-3],
display = TRUE
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.