NAME
compute_pearson.py - compute the Pearson’s linear correlation coefficient between two node properties.
SYNOPSYS
compute_pearson.py <file1> <file2>
DESCRIPTION
Compute the Pearson’s linear correlation coefficient between two sets of (either integer- or real-valued) node properties 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 a node property for the n-th node. For instance, file1 and file2 might contain the degrees of nodes at two distinct layers of a multiplex. However, the program is pretty general and can be used to compute the Pearson’s correlation coeffcient between any pairs of node properties.
OUTPUT
The program prints on stdout the value of the Pearson’s linear correlation coefficient between the two sets of node properties.
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