NAME
compute_rho.py - compute the Spearman’s rank correlation coefficient ρ between two rankings.
SYNOPSYS
compute_rho.py <file1> <file2>
DESCRIPTION
Compute the Spearman’s rank correlation coefficient ρ between two rankings provided in the input files file1 and file2. Each input file contains a list of lines, where the n-th line contains the value of rank of the n-th node. For instance, file1 and file2 might contain the ranks of nodes induced by the degree sequences of two distinct layers of a multiplex.
However, the program is pretty general and can be used to compute the Spearman’s rank correlation coefficient between any generic pair of rankings.
N.B.: A C implementation of this program, with the same interface is also available in the executable file compute_rho.
OUTPUT
The program prints on stdout the value of the Spearman’s rank correlation coefficient ρ between the two rankings provided as input.
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
V. Nicosia, G. Bianconi, V. Latora, M. Barthelemy, “Growing multiplex networks”, Phys. Rev. Lett. 111, 058701 (2013).
Link to paper: http://prl.aps.org/abstract/PRL/v111/i5/e058701
V. Nicosia, G. Bianconi, V. Latora, M. Barthelemy, “Non-linear growth and condensation in multiplex networks”, Phys. Rev. E 90, 042807 (2014).
Link to paper: http://journals.aps.org/pre/abstract/10.1103/PhysRevE.90.042807