diff options
Diffstat (limited to 'doc/latex/latex/structure')
29 files changed, 1002 insertions, 0 deletions
diff --git a/doc/latex/latex/structure/activity/degs_to_activity_overlap.tex b/doc/latex/latex/structure/activity/degs_to_activity_overlap.tex new file mode 100644 index 0000000..6e1908f --- /dev/null +++ b/doc/latex/latex/structure/activity/degs_to_activity_overlap.tex @@ -0,0 +1,29 @@ +\myprogram{{degs\_to\_activity\_overlap.py}} + {compute the activity and the total (overlapping) degree of + all the nodes of a multiplex.} + {$<$degree\_vectors$>$} + +\mydescription{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 \texttt{node\_degree\_vectors.py}), in the format: + + \hspace{0.5cm}\textit{noden\_deg\_lay1 noden\_deg\_lay2 ... noden\_deg\_layM} + + \noindent 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.} + +\myreturn{The program prints on \texttt{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: + + \hspace{0.5cm}\textit{noden\_activity noden\_tot\_deg} + + \noindent 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. + } + +\myreference{\refcorrelations} + diff --git a/doc/latex/latex/structure/activity/degs_to_binary.tex b/doc/latex/latex/structure/activity/degs_to_binary.tex new file mode 100644 index 0000000..7441b2d --- /dev/null +++ b/doc/latex/latex/structure/activity/degs_to_binary.tex @@ -0,0 +1,32 @@ +\myprogram{{degs\_to\_binary.py}} + {compute the activity vectors of all the nodes of a multiplex.} + {$<$degree\_vectors$>$} + +\mydescription{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 \texttt{node\_degree\_vectors.py}), in the format: + + \hspace{0.5cm}\textit{noden\_deg\_lay1 noden\_deg\_lay2 ... noden\_deg\_layM} + + \noindent and compute the corresponding node activity bit-strings, + where a "1" signals the presence of the node on that layer, while a + zero indicates its absence. +} + +\myreturn{The program returns on \texttt{stdout} a list of lines, + where the n-th line is the activity bit-string of the n-th + node. Additionally, the program prints on \texttt{stderr} the + distribution of all activity bit-strings, in the format: + + \hspace{0.5cm}\textit{Bn Bit-string count} + + \noindent Where \textit{B} is the number of ones in the activity + bit-string (i.e., the node-activity associated to that activity + bit-string), \textit{Bit-string} is the activity bit-string + and \textit{count} is the number of times that particular activity + bit-string appears in the multiplex.} + + + +\myreference{\refcorrelations} + diff --git a/doc/latex/latex/structure/activity/hamming_dist.tex b/doc/latex/latex/structure/activity/hamming_dist.tex new file mode 100644 index 0000000..3af188f --- /dev/null +++ b/doc/latex/latex/structure/activity/hamming_dist.tex @@ -0,0 +1,31 @@ +\myprogram{{hamming\_dist.py}} + {compute the normalised Hamming distance between all the pairs of + layers of a multiplex.} + {$<$layer1$>$ $<$layer2$>$ [$<$layer3$>$...]} + +\mydescription{Compute and print on output the normalised Hamming distance + $H_{\alpha, \beta}$ (i.e., the fraction of nodes which are active on + either of the layers, but not on both) between all pairs of + layers. The layers are given as input in the + files \textit{layer1}, \textit{layer2}, etc. + + Each input file contains the (undirected) edge list of a layer, and + each line is in the format: + + \hspace{0.5cm}\textit{src\_ID} \textit{dest\_ID} + + where \textit{src\_ID} and \textit{dest\_ID} are the IDs of the two + endpoints of an edge.} + +\myreturn{The program prints on \texttt{stdout} a list of lines, in + the format: + + \hspace{0.5cm} \textit{layer1 layer2 hamm} + + \noindent where \textit{layer1} and \textit{layer2} are the IDs of + the layers, and \textit{hamm} is the value of the normalised Haming + distance $H_{layer1, layer2}$. Layers IDs start from zero, are are + associated to the layers in the same order in which the layer files + are provided on the command line.} + +\myreference{\refcorrelations} diff --git a/doc/latex/latex/structure/activity/layer_activity.tex b/doc/latex/latex/structure/activity/layer_activity.tex new file mode 100644 index 0000000..34fcdd2 --- /dev/null +++ b/doc/latex/latex/structure/activity/layer_activity.tex @@ -0,0 +1,25 @@ +%%% +%%% Layer activity +%%% + +\myprogram{{layer\_activity.py}} + {compute the activity of the layers of a multiplex, i.e. the + number of active nodes on each layer.} + {$<$layer1$>$ [$<$layer2$>$ ...]} + +\mydescription{Compute and print on output the activity of the layers + of a multiplex network, where the layers are given as input in the + files \textit{layer1}, \textit{layer2}, etc. + + Each file contains the (undirected) edge list of a layer, and each + line is in the format: + + \hspace{0.5cm}\textit{src\_ID} \textit{dest\_ID} + + where \textit{src\_ID} and \textit{dest\_ID} are the IDs of the two + endpoints of an edge.} + +\myreturn{A listof lines, where the n-th line is the value of activity + of the n-th layer, starting from \textbf{0}.} + +\myreference{\refcorrelations} diff --git a/doc/latex/latex/structure/activity/layer_activity_vectors.tex b/doc/latex/latex/structure/activity/layer_activity_vectors.tex new file mode 100644 index 0000000..f0c2cd6 --- /dev/null +++ b/doc/latex/latex/structure/activity/layer_activity_vectors.tex @@ -0,0 +1,27 @@ +\myprogram{{layer\_activity\_vectors.py}} + {compute the activity vectors of all the layers of a multiplex.} + {$<$layer1$>$ [$<$layer2$>$ ...]} + +\mydescription{Compute and print on output the activity vectors of the + layers of a multiplex network, where the layers are given as input + in the files \textit{layer1}, \textit{layer2}, etc. + + Each input file contains the (undirected) edge list of a layer, and + each line is in the format: + + \hspace{0.5cm}\textit{src\_ID} \textit{dest\_ID} + + where \textit{src\_ID} and \textit{dest\_ID} are the IDs of the two + endpoints of an edge.} + +\myreturn{The program prints on \texttt{stdout} a list of lines, where + the n-th line contains the activity vector of the n-th layer, i.e. a + bit-string where each bit is set to ``1'' if the corresponding node + is active on the n-th layer, and to ``0'' otherwise. + + \noindent As usual, 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.} + +\myreference{\refcorrelations} diff --git a/doc/latex/latex/structure/activity/multiplexity.tex b/doc/latex/latex/structure/activity/multiplexity.tex new file mode 100644 index 0000000..b5c5506 --- /dev/null +++ b/doc/latex/latex/structure/activity/multiplexity.tex @@ -0,0 +1,30 @@ +\myprogram{{multiplexity.py}} + {compute the pairwise multiplexity between all the pairs of + layers of a multiplex.} + {$<$layer1$>$ $<$layer2$>$ [$<$layer3$>$...]} + +\mydescription{Compute and print on output the pairwise multiplexity + $Q_{\alpha, \beta}$ (i.e., the fraction of nodes active on both + layers) between all pairs of layers. The layers are given as + input in the files \textit{layer1}, \textit{layer2}, etc. + + Each input file contains the (undirected) edge list of a layer, and + each line is in the format: + + \hspace{0.5cm}\textit{src\_ID} \textit{dest\_ID} + + where \textit{src\_ID} and \textit{dest\_ID} are the IDs of the two + endpoints of an edge.} + +\myreturn{The program prints on \texttt{stdout} a list of lines, in + the format: + + \hspace{0.5cm} \textit{layer1 layer2 mult} + + \noindent where \textit{layer1} and \textit{layer2} are the IDs of + the layers, and \textit{mult} is the value of the multiplexity + $Q_{layer1, layer2}$. Layers IDs start from zero, are are associated + to the layers in the same order in which the layer files are + provided on the command line.} + +\myreference{\refcorrelations} diff --git a/doc/latex/latex/structure/activity/node_activity.tex b/doc/latex/latex/structure/activity/node_activity.tex new file mode 100644 index 0000000..882233d --- /dev/null +++ b/doc/latex/latex/structure/activity/node_activity.tex @@ -0,0 +1,25 @@ +%%% +%%% node_activity +%%% +\myprogram{{node\_activity.py}} + {compute the activity of the nodes of a multiplex, i.e. the + number of layers where each node is not isolated.} + {$<$layer1$>$ [$<$layer2$>$ ...]} + +\mydescription{Compute and print on output the activity of the nodes + of a multiplex network, whose layers are given as input in the files + \textit{layer1}, \textit{layer2}, etc. + + Each file contains the (undirected) edge list of a layer, and each + line is in the format: + + \hspace{0.5cm}\textit{src\_ID} \textit{dest\_ID} + + where \textit{src\_ID} and \textit{dest\_ID} are the IDs of the two + endpoints of an edge.} + +\myreturn{A list of lines, where the n-th line is the value of activity + of the n-th node, starting from \textbf{0}.} + +\myreference{\refcorrelations} + diff --git a/doc/latex/latex/structure/activity/node_activity_vectors.tex b/doc/latex/latex/structure/activity/node_activity_vectors.tex new file mode 100644 index 0000000..ca9301d --- /dev/null +++ b/doc/latex/latex/structure/activity/node_activity_vectors.tex @@ -0,0 +1,28 @@ +\myprogram{{node\_activity\_vectors.py}} + {compute the activity vectors of all the nodes of a multiplex.} + {$<$layer1$>$ [$<$layer2$>$ ...]} + +\mydescription{Compute and print on output the activity vectors of the + nodes of a multiplex network, whose layers are given as input in the + files \textit{layer1}, \textit{layer2}, etc. + + Each input file contains the (undirected) edge list of a layer, and + each line is in the format: + + \hspace{0.5cm}\textit{src\_ID} \textit{dest\_ID} + + where \textit{src\_ID} and \textit{dest\_ID} are the IDs of the two + endpoints of an edge.} + +\myreturn{The program prints on \texttt{stdout} a list of lines, where + the n-th line contains the activity vector of the n-th node, i.e. a + bit-string where each bit is set to ``1'' if the node is active on + the corresponding layer, and to ``0'' otherwise. + + \noindent As usual, 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, and will print on output a bit-string of + zeros.} + +\myreference{\refcorrelations} diff --git a/doc/latex/latex/structure/activity/node_degree_vectors.tex b/doc/latex/latex/structure/activity/node_degree_vectors.tex new file mode 100644 index 0000000..c86f083 --- /dev/null +++ b/doc/latex/latex/structure/activity/node_degree_vectors.tex @@ -0,0 +1,30 @@ +\myprogram{{node\_degree\_vectors.py}} + {compute the degree vectors of all the nodes of a multiplex network} + {$<$layer1$>$ [$<$layer2$>$ ...]} + +\mydescription{Compute and print on output the degree vectors of all + the nodes of a multiplex network, whose layers are given as + input in the files \textit{layer1}, \textit{layer2}, etc. + + Each file contains the (undirected) edge list of a layer, and each + line is in the format: + + \hspace{0.5cm}\textit{src\_ID} \textit{dest\_ID} + + where \textit{src\_ID} and \textit{dest\_ID} are the IDs of the two + endpoints of an edge.} + +\myreturn{A list of lines, where the n-th line is the + vector of degrees of the n-th node, in the format: + + \hspace{0.5cm}\textit{noden\_deg\_lay1 noden\_deg\_lay2 ... noden\_deg\_layM} + + \noindent As usual, 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. + +} + +\myreference{\refgrowth\\ \\ \indent \refmetrics} + diff --git a/doc/latex/latex/structure/correlations/compute_pearson.tex b/doc/latex/latex/structure/correlations/compute_pearson.tex new file mode 100644 index 0000000..8202753 --- /dev/null +++ b/doc/latex/latex/structure/correlations/compute_pearson.tex @@ -0,0 +1,28 @@ +\myprogram{{compute\_pearson.py}} + {compute the Pearson's linear correlation coefficient + between two node properties.} + {$<$file1$>$ $<$file2$>$} + +\mydescription{Compute the Pearson's linear correlation coefficient + between two sets of (either integer- or real-valued) node + properties provided in the input files \textit{file1} + and \textit{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, \textit{file1} + and \textit{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. + } + +\myreturn{The program prints on \texttt{stdout} the value of the + Pearson's linear correlation coefficient between the two + sets of node properties. +} + +\myreference{\refcorrelations + + \refgrowth + + \refnonlinear +} diff --git a/doc/latex/latex/structure/correlations/compute_rho.tex b/doc/latex/latex/structure/correlations/compute_rho.tex new file mode 100644 index 0000000..957b04c --- /dev/null +++ b/doc/latex/latex/structure/correlations/compute_rho.tex @@ -0,0 +1,32 @@ +\myprogram{{compute\_rho.py}} + {compute the Spearman's rank correlation coefficient $\rho$ + between two rankings.} {$<$file1$>$ $<$file2$>$} + +\mydescription{Compute the Spearman's rank correlation coefficient + $\rho$ between two rankings provided in the input + files \textit{file1} and \textit{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, \textit{file1} + and \textit{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 \texttt{compute\_rho}.} + + +\myreturn{The program prints on \texttt{stdout} the value of the + Spearman's rank correlation coefficient $\rho$ between the + two rankings provided as input. } + +\myreference{\refcorrelations + + \refgrowth + + \refnonlinear + } diff --git a/doc/latex/latex/structure/correlations/compute_tau.tex b/doc/latex/latex/structure/correlations/compute_tau.tex new file mode 100644 index 0000000..e6e8589 --- /dev/null +++ b/doc/latex/latex/structure/correlations/compute_tau.tex @@ -0,0 +1,31 @@ +\myprogram{{compute\_tau.py}} + {compute the Kendall's rank correlation coefficient $\tau_b$ + between two rankings.} {$<$file1$>$ $<$file2$>$} + +\mydescription{Compute the Kendall's rank correlation coefficient + $\tau_b$ between two rankings provided in the input + files \textit{file1} and \textit{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, \textit{file1} + and \textit{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 Kendall's rank correlation coefficient between + any generic pair of rankings. + + N.B.: This implementation takes properly into account rank + ties.} + + +\myreturn{The program prints on \texttt{stdout} the value of the + Kendall's rank correlation coefficient $\tau_b$ between the + two rankings provided as input. } + +\myreference{\refcorrelations + + \refgrowth + + \refnonlinear +} diff --git a/doc/latex/latex/structure/correlations/dump_k_q.tex b/doc/latex/latex/structure/correlations/dump_k_q.tex new file mode 100644 index 0000000..35aef8d --- /dev/null +++ b/doc/latex/latex/structure/correlations/dump_k_q.tex @@ -0,0 +1,42 @@ +M\myprogram{{dump\_k\_q}} + {compute the degree sequences of two layers of a multiplex.} + {$<$layer1$>$ $<$layer2$>$ $<$pairing$>$} + +\mydescription{Compute and dump on \texttt{stdout} the degree + sequences of two layers of a multiplex. The input + files \textit{layer1} and \textit{layer2} contain the + (undirected) edge lists of the two layers, and each line is + in the format: + + \hspace{0.5cm}\textit{src\_ID} \textit{dest\_ID} + + where \textit{src\_ID} and \textit{dest\_ID} are the IDs of the two + endpoints of an edge. + + The third file \textit{pairing} is a list of lines in the format: + + \hspace{0.5cm} \textit{IDL1 IDL2} + + where \textit{IDL1} is the ID of a node on layer $1$ + and \textit{IDL2} is the ID of the same node on layer $2$. For + instance, the line: + + \hspace{0.5cm} \textit{5 27} + + indicates that node $5$ on layer $1$ has ID $27$ on layer $2$. } + + +\myreturn{The program prints on \texttt{stdout} the degree of each +node on the two layers, in the format: + +\hspace{0.5cm} \textit{ki qi} + +where \textit{ki} is the degree of node \textit{i} on layer $1$ +and \textit{qi} is the degree of node \textit{i} on layer $2$.} + +\myreference{\refcorrelations + + \refgrowth + + \refnonlinear + } diff --git a/doc/latex/latex/structure/correlations/fit_knn.tex b/doc/latex/latex/structure/correlations/fit_knn.tex new file mode 100644 index 0000000..cb90c2b --- /dev/null +++ b/doc/latex/latex/structure/correlations/fit_knn.tex @@ -0,0 +1,50 @@ +\myprogram{{fit\_knn}} + {power-law fit of the inter-layer degree correlation + function.} + {$<$filein$>$ $<$alpha$>$} + +\mydescription{Perform a power-law fit of the inter-layer degree + correlation function: + + \begin{equation*} + \overline{q}(k) = \frac{1}{N_{q}}\sum_{q'} q' P(q'|k) + \end{equation*} + + where $k$ is the degree of a node on layer $1$, $q$ is the + degree on layer $2$ and $P(q|k)$ is the probability that a + node with degree $k$ on layer $1$ has degree $q$ on layer + $2$. The program assumes that $\overline{q}(k)$ can be + written in the form $a k^{b}$, and computes the two + parameters $a$ and $b$ through a linear fit of the log-log + plot of $\overline{q}(k)$. + + The input file \textit{filein} contains a list of lines in + the format: + + \hspace{0.5cm} \textit{ki qi} + + where \textit{ki} is the degree of node $i$ at layer $1$ + and \textit{qi} is the degree of node $i$ at layer $2$. + + The second parameter \textit{alpha} is the ratio of the + progression used to generate the exponentially-distributed + bins for the log-log plot. Typical values of \textit{alpha} + are between $1.1$ and $2.0$. + + + N.B.: The exponent $b$ computed with this method is known to + be inaccurate. +} + + + +\myreturn{The program prints on \texttt{stdout} the values of the + parameters $a$ and $b$ of the power-law fit $\overline{q}(k) + = a k^{b}$.} + +\myreference{\refcorrelations + + \refgrowth + + \refnonlinear + } diff --git a/doc/latex/latex/structure/correlations/knn_q_from_degrees.tex b/doc/latex/latex/structure/correlations/knn_q_from_degrees.tex new file mode 100644 index 0000000..cab0905 --- /dev/null +++ b/doc/latex/latex/structure/correlations/knn_q_from_degrees.tex @@ -0,0 +1,64 @@ +\myprogram{{knn\_q\_from\_degrees.py}} + {compute the inter-layer degree-degree correlation function.} + {$<$filein$>$} + +\mydescription{Compute the inter-layer degree + correlation functions for two layers of a multiplex, using + the degrees of the nodes specified in the input file. The + format of the input file is as follows + +\hspace{0.5cm} \textit{ki qi} + +where \textit{ki} and \textit{qi} are, respectively, the degree at +layer 1 and the degree at layer 2 of node \textit{i}. + + If we consider two layers of a multiplex, and we denote by + $k$ the degree of a node on the first layer and by $q$ the + degree of the same node on the second layers, the + inter-layer degree correlation function is defined as + + \begin{equation*} + \overline{k}(q) = \frac{1}{N_{k}}\sum_{k'} k' P(k'|q) + \end{equation*} + + where $P(k'|q)$ is the probability that a node with degree + $q$ on the second layer has degree equal to $k'$ on the + first layer, and $N_k$ is the number of nodes with degree + $k$ on the first layer. The quantity $\overline{k}(q)$ is + the expected degree at layer $1$ of node that have degree + equal to $q$ on layer $2$. The dual quantity: + + \begin{equation*} + \overline{q}(k) = \frac{1}{N_{q}}\sum_{q'} q' P(q'|k) + \end{equation*} + + is the average degree on layer $2$ of nodes having degree + $k$ on layer $1$. +} + + +\myreturn{The program prints on \texttt{stdout} a list of lines in + the format: + + \hspace{0.5cm} \textit{k $\overline{q}(k)$} + + where \textit{k} is the degree on layer $1$ and + $\overline{q}(k)$ is the average degree on layer $2$ of + nodes having degree equal to $k$ on layer $1$. + + The program also prints on \texttt{stderr} a list of lines in + the format: + + \hspace{0.5cm} \textit{q $\overline{k}(q)$} + + where \textit{q} is the degree on layer $2$ and + $\overline{k}(q)$ is the average degree on layer $1$ of + nodes having degree equal to $q$ on layer $2$. + } + +\myreference{\refcorrelations + + \refgrowth + + \refnonlinear + } diff --git a/doc/latex/latex/structure/correlations/knn_q_from_layers.tex b/doc/latex/latex/structure/correlations/knn_q_from_layers.tex new file mode 100644 index 0000000..f124e55 --- /dev/null +++ b/doc/latex/latex/structure/correlations/knn_q_from_layers.tex @@ -0,0 +1,80 @@ +\myprogram{{knn\_q\_from\_layers.py}} + {compute intra-layer and inter-layer degree-degree + correlation coefficients.} {$<$layer1$>$ $<$layer2$>$} + +\mydescription{Compute the intra-layer and the inter-layer degree + correlation functions for two layers given as input. The + intra-layer degree correlation function quantifies the + presence of degree-degree correlations in a single layer + network, and is defined as: + + \begin{equation*} + \avg{k_{nn}(k)} = \frac{1}{k N_k}\sum_{k'}k'P(k'|k) + \end{equation*} + + where $P(k'|k)$ is the probability that a neighbour of a + node with degree $k$ has degree $k'$, and $N_k$ is the + number of nodes with degree $k$. The quantity + $\avg{k_{nn}(k)}$ is the average degree of the neighbours of + nodes having degree equal to $k$. + + If we consider two layers of a multiplex, and we denote by + $k$ the degree of a node on the first layer and by $q$ the + degree of the same node on the second layers, the + inter-layer degree correlation function is defined as + + \begin{equation*} + \overline{k}(q) = \sum_{k'} k' P(k'|q) + \end{equation*} + + where $P(k'|q)$ is the probability that a node with degree + $q$ on the second layer has degree equal to $k'$ on the + first layer, and $N_q$ is the number of nodes with degree + $q$ on the second layer. The quantity $\overline{k}(q)$ is + the expected degree at layer $1$ of node that have degree + equal to $q$ on layer $2$. The dual quantity: + + \begin{equation*} + \overline{q}(k) = \sum_{q'} q' P(q'|k) + \end{equation*} + + is the average degree on layer $2$ of nodes having degree + $k$ on layer $1$. +} + + +\myreturn{The program creates two output files, respectively called + +\hspace{0.5cm} \textit{file1\_file2\_k1} + +and + +\hspace{0.5cm} \textit{file1\_file2\_k2} + +The first file contains a list of lines in the format: + +\hspace{0.5cm} \textit{k $\avg{k_{nn}(k)}$ $\sigma_k$ +$\overline{q}(k)$ $\sigma_{\overline{q}}$} + +where $k$ is the degree at first layer, $\avg{k_{nn}(k)}$ is the +average degree of the neighbours at layer $1$ of nodes having degree +$k$ at layer $1$, $\sigma_k$ is the standard deviation associated to +$\avg{k_{nn}(k)}$, $\overline{q}(k)$ is the average degree at layer +$2$ of nodes having degree equal to $k$ at layer $1$, and +$\sigma_{\overline{q}}$ is the standard deviation associated to +$\overline{q}(k)$. + +The second file contains a similar list of lines, in the format: + +\hspace{0.5cm} \textit{q $\avg{q_{nn}(q)}$ $\sigma_q$ +$\overline{k}(q)$ $\sigma_{\overline{k}}$} + +with obvious meaning. +} + +\myreference{\refcorrelations + + \refgrowth + + \refnonlinear + } diff --git a/doc/latex/latex/structure/correlations/rank_nodes.tex b/doc/latex/latex/structure/correlations/rank_nodes.tex new file mode 100644 index 0000000..b1a970a --- /dev/null +++ b/doc/latex/latex/structure/correlations/rank_nodes.tex @@ -0,0 +1,19 @@ +\myprogram{{rank\_nodes.py}} + {rank the nodes of a layer according to a given structural + descriptor.} {$<$prop\_file$>$} + +\mydescription{Get a file as input, whose n-th line corresponds to the value of a + certain property of the n-th node, and rank the nodes according to + that property, taking into account ranking ties properly. + + For example, if \textit{propfile} contains the degrees of the nodes + at a certain layer of the multiplex, the computes the ranking induced + by degrees, where the node with the highest degree will be assigned a + rank equal to \textbf{1} (one). +} + +\myreturn{The program prints on \texttt{stdout} a list of lines, where + the n-th line contains the rank of the n-th node corresponding to the + values of the structural descriptor provided in the input file.} + +\myreference{\refcorrelations} diff --git a/doc/latex/latex/structure/correlations/rank_nodes_thresh.tex b/doc/latex/latex/structure/correlations/rank_nodes_thresh.tex new file mode 100644 index 0000000..3b430d1 --- /dev/null +++ b/doc/latex/latex/structure/correlations/rank_nodes_thresh.tex @@ -0,0 +1,18 @@ +\myprogram{{rank\_nodes\_thresh.py}} + {rank the nodes of a layer whose value of a given structural + descriptor is above a threshold.} {$<$prop\_file$>$ $<$thresh$>$} + +\mydescription{Get a file as input, whose n-th line corresponds to the value of a + certain property of the n-th node, and rank the nodes according to + that property, taking into account ranking ties properly. The rank of + all the nodes whose value of the structural descriptor is smaller + than the threshold \textit{thresh} specified as second parameter is + set to \textbf{0} (ZERO). } + +\myreturn{The program prints on \texttt{stdout} a list of lines, where + the n-th line contains the rank of the n-th node corresponding to the + values of the structural descriptor provided in the input file, or + zero if such desxriptor is below the specified + threshold \textit{thresh}.} + +\myreference{\refcorrelations} diff --git a/doc/latex/latex/structure/correlations/rank_occurrence.tex b/doc/latex/latex/structure/correlations/rank_occurrence.tex new file mode 100644 index 0000000..96fb914 --- /dev/null +++ b/doc/latex/latex/structure/correlations/rank_occurrence.tex @@ -0,0 +1,24 @@ +\myprogram{{rank\_occurrence.py}} + {compute the intersection of two rankings.} + {$<$rank1$>$ $<$rank2$>$ $<$increment$>$} + +\mydescription{Get two rankings \textit{rank1} and \textit{rank2} + and compute the size of +the \textit{k}-intersection, i.e. the number of elements which are +present in the first k positions of both rankings, as a function +of \textit{k}. The parameter \textit{increment} determines the +distance between two subsequent values of \textit{k}. + +Each input file is a list of node IDs, one per line, where the first +line contains the ID of the highest ranked node. +} + +\myreturn{The program prints on \texttt{stdout} a list of lines in the +format: + + \hspace{0.5cm} \textit{k num\_k} + + where \textit{num\_k} is the number of nodes which are present in + the first \textit{k} positions of both rankings.} + +\myreference{\refcorrelations} diff --git a/doc/latex/latex/structure/metrics/aggregate_layers_w.tex b/doc/latex/latex/structure/metrics/aggregate_layers_w.tex new file mode 100644 index 0000000..8917e3e --- /dev/null +++ b/doc/latex/latex/structure/metrics/aggregate_layers_w.tex @@ -0,0 +1,30 @@ +\myprogram{{aggregate\_layers\_w.py}} + {compute the (weighted) aggregated graph associated to a + multiplex.} {$<$layer1$>$ $<$layer2$>$ [$<$layer3$>$...]} + +\mydescription{Compute and print on output the edge list of the + weighted aggregated graph associated to the multiplex + network given on input. An edge is present in the + aggregated graph if it exists in at least one of the M + layers of the multiplex. + + Each input file contains the (undirected) edge list of a layer, and + each line is in the format: + + \hspace{0.5cm}\textit{src\_ID} \textit{dest\_ID} + + where \textit{src\_ID} and \textit{dest\_ID} are the IDs of the two + endpoints of an edge.} + +\myreturn{The program prints on \texttt{stdout} the edge list of the + aggregated graph associated to the multiplex network. The edge list + is a list of lines in the format: + + + \hspace{0.5cm} \textit{ID1 ID2 weight} + + \noindent where \textit{ID1} and \textit{ID2} are the IDs of the two + nodes and \textit{weight} is the number of layers in which an edge + between \textit{ID1} and \textit{ID2} exists.} + +\myreference{\refcorrelations} diff --git a/doc/latex/latex/structure/metrics/avg_edge_overlap.tex b/doc/latex/latex/structure/metrics/avg_edge_overlap.tex new file mode 100644 index 0000000..4df2d51 --- /dev/null +++ b/doc/latex/latex/structure/metrics/avg_edge_overlap.tex @@ -0,0 +1,42 @@ +\myprogram{{avg\_edge\_overlap.py}} + {compute the average edge overlap of a multiplex.} + {$<$layer1$>$ [$<$layer2$>$...]} + +\mydescription{Compute and print on output the average edge overlap + + \begin{equation*} \omega^{*} + = \frac{\sum_{i}\sum_{j>i}\sum_{\alpha}a_{ij}\lay{\alpha}}{ \sum_{i}\sum_{j>i}(1 + - \delta_{0,\sum_{\alpha}a_{ij}\lay{\alpha}})} \end{equation*} + + \noindent i.e., the expected \textit{number} of layers on which an + edge of the multiplex exists, and the corresponding normalised + quantity: + + \begin{equation*} + \omega = \frac{\sum_{i}\sum_{j>i}\sum_{\alpha}a_{ij}\lay{\alpha}}{M \sum_{i}\sum_{j>i}(1 + - \delta_{0,\sum_{\alpha}a_{ij}\lay{\alpha}})} + \end{equation*} + + \noindent that is the expected \textit{fraction} of layers on which + an edge of the multiplex is present. + + Each input file contains the (undirected) edge list of a layer, and + each line is in the format: + + \hspace{0.5cm}\textit{src\_ID} \textit{dest\_ID} + + where \textit{src\_ID} and \textit{dest\_ID} are the IDs of the two + endpoints of an edge.} + +\myreturn{The program prints on \texttt{stdout} a single line, in the + format: + + \hspace{0.5cm} \textit{omega\_star omega} + + \noindent where \textit{omega\_star} and \textit{omega} are, + respectively, the expected number and fraction of layers in which an + edge is present.} + +\myreference{\refmetrics + + \vspace{0.5cm}\refvisibility} diff --git a/doc/latex/latex/structure/metrics/cartography_from_columns.tex b/doc/latex/latex/structure/metrics/cartography_from_columns.tex new file mode 100644 index 0000000..8e797af --- /dev/null +++ b/doc/latex/latex/structure/metrics/cartography_from_columns.tex @@ -0,0 +1,35 @@ +\myprogram{{cartography\_from\_columns.py}} + {compute total and participation coefficient of generic + structural descriptors of the nodes of a multiplex.} + {$<$filein$>$ $<$col1$>$ $<$col2$>$ [$<$col3$>$...]} + +\mydescription{Compute and print on output the sum and the + corresponding participation coefficient of a generic + structural descriptor of the nodes of a multiplex. + + \noindent The input file is a generic collection of + single-space-separated columns, where each line corresponds to a + node. The user must specify the IDs of the columns which contain + the node structural descriptors to be used in the cartography + diagram. Columns IDs start from ZERO. For example: + + \textbf{python cartography\_from\_layers.py filein.txt 0 + 2 4 6 8} + + \noindent will create a cartography diagram assuming that the + multiplex network has five layers, and that the node structural + descriptors at each layers are contained in the first (0), third + (2), fifth (4), seventh (6) and nineth (8) columns of each row.} + + +\myreturn{The program prints on \texttt{stdout} a list of lines in the + format: + + \hspace{0.5cm} \textit{tot\_n P\_n} + + where \textit{tot\_n} is the sum over the layers of the considered + structural descriptor for node $n$, and \textit{P\_n} is the + associated participation coefficient + } + +\myreference{\refcorrelations} diff --git a/doc/latex/latex/structure/metrics/cartography_from_deg_vectors.tex b/doc/latex/latex/structure/metrics/cartography_from_deg_vectors.tex new file mode 100644 index 0000000..848ffd1 --- /dev/null +++ b/doc/latex/latex/structure/metrics/cartography_from_deg_vectors.tex @@ -0,0 +1,32 @@ +\myprogram{{cartography\_from\_deg\_vectors.py}} + {create a multiplex cartography diagram.} + {$<$node\_deg\_vectors$>$} + +\mydescription{Compute and print on output the total degree and the + multiplex participation coefficient of all the nodes of a + multiplex network whose list of node degree vectors is + provided as input. The input file is in the format: + + \hspace{0.5cm} \textit{IDn\_deg1 IDn\_deg\_2 ... IDn\_degM} + + \noindent where \textit{IDn\_degX} is the degree of node $n$ at + layer $X$. The input file can be generated using the + script \texttt{node\_degree\_vectors.py}.} + + +\myreturn{The program prints on \texttt{stdout} a list of lines in the + format: + + \hspace{0.5cm} \textit{tot\_deg part\_coeff} + + \noindent where \textit{tot\_deg} is the total degree of the node + and \textit{part\_coeff} is the corresponding participation + coefficient. + + \noindent As usual, node IDs start from zero and proceed + sequentially, without gaps, so if one of the lines in the input + files contains just zeros, the program considers the corresponding + node as being isolated on all the layers, and both its total degree + and multiplex participation coefficient are set equal to zero. } + +\myreference{\refmetrics} diff --git a/doc/latex/latex/structure/metrics/cartography_from_layers.tex b/doc/latex/latex/structure/metrics/cartography_from_layers.tex new file mode 100644 index 0000000..8958cef --- /dev/null +++ b/doc/latex/latex/structure/metrics/cartography_from_layers.tex @@ -0,0 +1,45 @@ +\myprogram{{cartography\_from\_layers.py}} + {compute the total degree and the multiplex participation + coefficient of all the nodes of a multiplex.} {$<$layer1$>$ + $<$layer2$>$ [$<$layer3$>$...]} + +\mydescription{Compute and print on output the total degree and the multiplex participation + coefficient $P_i$ for each node $i$ of a multiplex. The + participation coefficient is defined as: + + \begin{equation*} + P_i=\frac{M}{M-1}\left[1-\sum_{\alpha=1}^M\biggl(\frac{k_i^{[\alpha]}}{o_i}\biggr)^2\right] + \end{equation*} + + \noindent Note that $P_i$ takes values in $[0,1]$, where $P_i=0$ + if and only if node $i$ is active on exactly one of the layers, + while $P_i=1$ if node $i$ has equal degree on all the $M$ layers. + + Each input file contains the (undirected) edge list of a layer, and + each line is in the format: + + \hspace{0.5cm}\textit{src\_ID} \textit{dest\_ID} + + where \textit{src\_ID} and \textit{dest\_ID} are the IDs of the two + endpoints of an edge.} + +\myreturn{The program prints on \texttt{stdout} a list of lines in the + format: + + \hspace{0.5cm} \textit{deg\_n P\_n col\_n} + + where \textit{deg\_n} is the total degree of node $n$, \textit{P\_n} + is the participation coefficient of node $n$ and \textit{col} is the + integer representation of the activity bitstring of node $n$, which + is a number between $0$ and $2^{M}-1$. The field \textit{col} might + be useful for the visualisation of the multiplex cartography + diagram, where it would be possible to associate different colors to + nodes having different node activity patterns. + + \noindent As usual, 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, and is set to zero. + } + +\myreference{\refmetrics} diff --git a/doc/latex/latex/structure/metrics/edge_overlap.tex b/doc/latex/latex/structure/metrics/edge_overlap.tex new file mode 100644 index 0000000..64d7dbf --- /dev/null +++ b/doc/latex/latex/structure/metrics/edge_overlap.tex @@ -0,0 +1,36 @@ +\myprogram{{edge\_overlap.py}} + {compute the edge overlap of all the edges of the + multiplex.} + {$<$layer1$>$ [$<$layer2$>$...]} + +\mydescription{Compute and print on output the edge overlap $o_{ij}$ of each + edge of the multiplex. Given a pair of nodes $(i,j)$ that + are directly connected on at least one of the $M$ layers, + the edge overlap $o_{ij}$ is defined as: + + \begin{equation*} + o_{ij} = \sum_{\alpha}a_{ij}\lay{\alpha} + \end{equation*} + + \noindent i.e., the number of layers on which the edge $(i,j)$ + exists. + + + Each input file contains the (undirected) edge list of a layer, and + each line is in the format: + + \hspace{0.5cm}\textit{src\_ID} \textit{dest\_ID} + + where \textit{src\_ID} and \textit{dest\_ID} are the IDs of the two + endpoints of an edge.} + +\myreturn{The program prints on \texttt{stdout} a list of lines in the + format: + + \hspace{0.5cm} \textit{ID\_1 ID\_2 overlap} + + \noindent where \textit{ID\_1} and \textit{ID\_2} are the IDs of the + end-points of the edge, and \textit{overlap} is the number of layers + in which the edge exists.} + +\myreference{\refmetrics} diff --git a/doc/latex/latex/structure/metrics/intersect_layers.tex b/doc/latex/latex/structure/metrics/intersect_layers.tex new file mode 100644 index 0000000..0824400 --- /dev/null +++ b/doc/latex/latex/structure/metrics/intersect_layers.tex @@ -0,0 +1,28 @@ +\myprogram{{intersect\_layers.py}} + {compute the intersection graph associated to a + multiplex.} {$<$layer1$>$ $<$layer2$>$ [$<$layer3$>$...]} + +\mydescription{Compute and print on output the edge list of the + intersection graph associated to the multiplex network + given on input, where an edge exists only if it is + present on \textbf{all} the layers of the multiplex. + + Each input file contains the (undirected) edge list of a layer, and + each line is in the format: + + \hspace{0.5cm}\textit{src\_ID} \textit{dest\_ID} + + where \textit{src\_ID} and \textit{dest\_ID} are the IDs of the two + endpoints of an edge.} + +\myreturn{The program prints on \texttt{stdout} the edge list of the + intersection graph associated to the multiplex network. The edge + list is a list of lines in the format: + + + \hspace{0.5cm} \textit{ID1 ID2} + + \noindent where \textit{ID1} and \textit{ID2} are the IDs of the two + nodes.} + +\myreference{\refcorrelations} diff --git a/doc/latex/latex/structure/metrics/overlap_degree.tex b/doc/latex/latex/structure/metrics/overlap_degree.tex new file mode 100644 index 0000000..500a76a --- /dev/null +++ b/doc/latex/latex/structure/metrics/overlap_degree.tex @@ -0,0 +1,45 @@ +\myprogram{{overlap\_degree.py}} + {compute the total (overlapping) degree of all the nodes of + a multiplex and the corresponding Z-score. } {$<$layer1$>$ $<$layer2$>$ [$<$layer3$>$...]} + +\mydescription{Compute and print on output the total degree $o_i$ of each + node $i$ of a multiplex, defined as: + + \begin{equation*} + o_{i} = \sum_{\alpha}\sum_{j}a_{ij}\lay{\alpha} + \end{equation*} + + \noindent and the corresponding Z-score: + + \begin{equation*} + z(o_i) = \frac{o_i - \avg{o}}{\sigma_o} + \end{equation*} + + \noindent where $\avg{o}$ and $\sigma_o$ are, respectively, the mean + and the standard deviation of the total degree computed over all the + active nodes of the multiplex. + + + Each input file contains the (undirected) edge list of a layer, and + each line is in the format: + + \hspace{0.5cm}\textit{src\_ID} \textit{dest\_ID} + + where \textit{src\_ID} and \textit{dest\_ID} are the IDs of the two + endpoints of an edge.} + +\myreturn{The program prints on \texttt{stdout} a list of lines in the + format: + + \hspace{0.5cm} \textit{ID\_n deg\_n z\_n} + + where \textit{ID\_n} is the ID of the node, \textit{deg\_n} is its + total degree, and \textit{z\_n} is the corresponding Z-score. + + \noindent As usual, 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, and the node is omitted from the + output.} + +\myreference{\refmetrics} diff --git a/doc/latex/latex/structure/metrics/part_coeff.tex b/doc/latex/latex/structure/metrics/part_coeff.tex new file mode 100644 index 0000000..f3afd7d --- /dev/null +++ b/doc/latex/latex/structure/metrics/part_coeff.tex @@ -0,0 +1,43 @@ +\myprogram{{part\_coeff.py}} + {compute the multiplex partifipation coefficient of all the nodes of + a multiplex.} {$<$layer1$>$ $<$layer2$>$ [$<$layer3$>$...]} + +\mydescription{Compute and print on output the multiplex participation + coefficient $P_i$ for each node $i$ of a multiplex. The + participation coefficient is defined as: + + \begin{equation*} + P_i=\frac{M}{M-1}\left[1-\sum_{\alpha=1}^M\biggl(\frac{k_i^{[\alpha]}}{o_i}\biggr)^2\right] + \end{equation*} + + \noindent Note that $P_i$ takes values in $[0,1]$, where $P_i=0$ + if and only if node $i$ is active on exactly one of the layers, + while $P_i=1$ if node $i$ has equal degree on all the $M$ layers. + + Each input file contains the (undirected) edge list of a layer, and + each line is in the format: + + \hspace{0.5cm}\textit{src\_ID} \textit{dest\_ID} + + where \textit{src\_ID} and \textit{dest\_ID} are the IDs of the two + endpoints of an edge.} + +\myreturn{The program prints on \texttt{stdout} a list of lines in the + format: + + \hspace{0.5cm} \textit{deg\_n P\_n col\_n} + + where \textit{deg\_n} is the total degree of node $n$, \textit{P\_n} + is the participation coefficient of node $n$ and \textit{col} is the + integer representation of the activity bitstring of node $n$, which + is a number between $0$ and $2^{M}-1$. The field \textit{col} might + be useful in visualisations, where it would be possible to associate + different colors to nodes having diffrent node activity patterns. + + \noindent As usual, 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, and is set to zero. + } + +\myreference{\refmetrics} diff --git a/doc/latex/latex/structure/reinforcement/reinforcement.tex b/doc/latex/latex/structure/reinforcement/reinforcement.tex new file mode 100644 index 0000000..a65b05e --- /dev/null +++ b/doc/latex/latex/structure/reinforcement/reinforcement.tex @@ -0,0 +1,21 @@ +%%% +%%% Layer activity +%%% + +\myprogram{{reinforcement.py}} + {compute the probability to have a link between two nodes in layer $1$ given their weight in layer $2$.} + {$<$layer1$>$ $<$layer2$>$ $<N_{bins}>$ $<min_{value}>$ $<max_{value}>$} + +\mydescription{Compute and print on output the probability to have a link between two nodes in layer $1$ given their weight in layer $2$. +As input are given the files \textit{layer1}, \textit{layer2}, the number of bins for the link weights of the second layer, the minimum and the maximum values of the binning. + + The first file contains the binary edge list of layer $1$, the second file contains the weighted edge list of layer $2$. each + line is in the format: + + \hspace{0.5cm}\textit{bin\_min} \textit{bin\_max} \textit{freq} + + where \textit{bin\_min} and \textit{bin\_max} are the minimum and maximum values of the link weights of layer $2$ in that binning, and \textit{freq} is the probability to have a link on layer $1$ given such weight in layer $2$.} + +\myreturn{A list of lines, where the n-th line is the minimum and maximum values of the weight of the links in layer $2$ in the n-th bin, and the frequency to have a link on layer $2$ given that weight.} + +\myreference{\refmetrics} |