degs_to_activity_overlap.py

NAME

degs_to_activity_overlap.py - compute the activity and the total (overlapping) degree of all the nodes of a multiplex.

SYNOPSYS

degs_to_activity_overlap.py <degree_vectors>

DESCRIPTION

Take a file which contains, on the n-th line, the degrees at each layer of the n-th node, (e.g., the result of the script node_degree_vectors.py), in the format:

  noden_deg_lay1 noden_deg_lay2 ... noden_deg_layM

and compute the activity (i.e., the number of layers in which a node is not isolated) and the total (overlapping) degree of each node.

OUTPUT

The program prints on stdout a list of lines, where the n-th line contains the activity and the total degree of the n-th nodem in the format:

  noden_activity noden_tot_deg

As usual, the program assumes that node IDs start from zero and proceed sequentially, without gaps, i.e., if a node ID is not present in any of the layer files given as input, the program considers it as being isolated on all the layers.

REFERENCE

V. Nicosia, V. Latora, “Measuring and modeling correlations in multiplex networks”, Phys. Rev. E 92, 032805 (2015).

Link to paper: http://journals.aps.org/pre/abstract/10.1103/PhysRevE.92.032805