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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title>1.2.3.0 knn_q_from_layers.py</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">
<meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">
<!-- html,index=2,3,4,5,next -->
<meta name="src" content="mammult_doc.tex">
<meta name="date" content="2015-10-19 17:06:00">
<link rel="stylesheet" type="text/css" href="mammult_doc.css">
</head><body
>
<!--l. 3--><div class="crosslinks"><p class="noindent">[<a
href="mammult_docsu34.html" >next</a>] [<a
href="mammult_docsu32.html" >prev</a>] [<a
href="mammult_docsu32.html#tailmammult_docsu32.html" >prev-tail</a>] [<a
href="#tailmammult_docsu33.html">tail</a>] [<a
href="mammult_docsu31.html#mammult_docsu33.html" >up</a>] </p></div>
<h5 class="subsubsectionHead"><a
id="x37-360001.2.3"></a><span
class="cmtt-10x-x-109">knn</span><span
class="cmtt-10x-x-109">_q</span><span
class="cmtt-10x-x-109">_from</span><span
class="cmtt-10x-x-109">_layers.py</span></h5>
<!--l. 3--><p class="noindent" ><span
class="cmbx-10x-x-109">NAME</span>
<!--l. 3--><p class="indent" > <span
class="cmbx-10x-x-109">knn</span><span
class="cmbx-10x-x-109">_q</span><span
class="cmbx-10x-x-109">_from</span><span
class="cmbx-10x-x-109">_layers.py </span>- compute intra-layer and inter-layer degree-degree
correlation coefficients.
<!--l. 3--><p class="noindent" ><span
class="cmbx-10x-x-109">SYNOPSYS</span>
<!--l. 3--><p class="indent" > <span
class="cmbx-10x-x-109">knn</span><span
class="cmbx-10x-x-109">_q</span><span
class="cmbx-10x-x-109">_from</span><span
class="cmbx-10x-x-109">_layers.py </span><span
class="cmmi-10x-x-109"><</span><span
class="cmitt-10x-x-109">layer1</span><span
class="cmmi-10x-x-109">> <</span><span
class="cmitt-10x-x-109">layer2</span><span
class="cmmi-10x-x-109">></span>
<!--l. 43--><p class="noindent" ><span
class="cmbx-10x-x-109">DESCRIPTION</span>
<!--l. 43--><p class="indent" > 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:
<table
class="equation-star"><tr><td>
<center class="math-display" >
<img
src="mammult_doc6x.png" alt=" --1- ∑ ′ ′
⟨knn(k)⟩ = kNk k P(k |k )
k′
" class="math-display" ></center></td></tr></table>
<!--l. 43--><p class="nopar" >
<!--l. 43--><p class="indent" > where <span
class="cmmi-10x-x-109">P</span>(<span
class="cmmi-10x-x-109">k</span><span
class="cmsy-10x-x-109">′|</span><span
class="cmmi-10x-x-109">k</span>) is the probability that a neighbour of a node with degree <span
class="cmmi-10x-x-109">k </span>has
degree <span
class="cmmi-10x-x-109">k</span><span
class="cmsy-10x-x-109">′</span>, and <span
class="cmmi-10x-x-109">N</span><sub><span
class="cmmi-8">k</span></sub> is the number of nodes with degree <span
class="cmmi-10x-x-109">k</span>. The quantity <span
class="cmsy-10x-x-109">⟨</span><span
class="cmmi-10x-x-109">k</span><sub><span
class="cmmi-8">nn</span></sub>(<span
class="cmmi-10x-x-109">k</span>)<span
class="cmsy-10x-x-109">⟩ </span>is
the average degree of the neighbours of nodes having degree equal to
<span
class="cmmi-10x-x-109">k</span>.
<!--l. 43--><p class="indent" > If we consider two layers of a multiplex, and we denote by <span
class="cmmi-10x-x-109">k </span>the degree
of a node on the first layer and by <span
class="cmmi-10x-x-109">q </span>the degree of the same node on
the second layers, the inter-layer degree correlation function is defined
as
<table
class="equation-star"><tr><td>
<center class="math-display" >
<img
src="mammult_doc7x.png" alt="-- ∑ ′ ′
k(q) = k P(k |q)
k′
" class="math-display" ></center></td></tr></table>
<!--l. 43--><p class="nopar" >
<!--l. 43--><p class="indent" > where <span
class="cmmi-10x-x-109">P</span>(<span
class="cmmi-10x-x-109">k</span><span
class="cmsy-10x-x-109">′|</span><span
class="cmmi-10x-x-109">q</span>) is the probability that a node with degree <span
class="cmmi-10x-x-109">q </span>on the second layer
has degree equal to <span
class="cmmi-10x-x-109">k</span><span
class="cmsy-10x-x-109">′ </span>on the first layer, and <span
class="cmmi-10x-x-109">N</span><sub><span
class="cmmi-8">q</span></sub> is the number of nodes
with degree <span
class="cmmi-10x-x-109">q </span>on the second layer. The quantity <span class="overline"><span
class="cmmi-10x-x-109">k</span></span>(<span
class="cmmi-10x-x-109">q</span>) is the expected
degree at layer 1 of node that have degree equal to <span
class="cmmi-10x-x-109">q </span>on layer 2. The dual
quantity:
<table
class="equation-star"><tr><td>
<center class="math-display" >
<img
src="mammult_doc8x.png" alt="-- ∑ ′ ′
q(k) = q P(q |k)
q′
" class="math-display" ></center></td></tr></table>
<!--l. 43--><p class="nopar" >
<!--l. 43--><p class="indent" > is the average degree on layer 2 of nodes having degree <span
class="cmmi-10x-x-109">k </span>on layer
1.
<!--l. 73--><p class="noindent" ><span
class="cmbx-10x-x-109">OUTPUT</span>
<!--l. 73--><p class="indent" > The program creates two output files, respectively called
<!--l. 73--><p class="indent" >   <span
class="cmti-10x-x-109">file1</span><span
class="cmti-10x-x-109">_file2</span><span
class="cmti-10x-x-109">_k1</span>
<!--l. 73--><p class="indent" > and
<!--l. 73--><p class="indent" >   <span
class="cmti-10x-x-109">file1</span><span
class="cmti-10x-x-109">_file2</span><span
class="cmti-10x-x-109">_k2</span>
<!--l. 73--><p class="indent" > The first file contains a list of lines in the format:
<!--l. 73--><p class="indent" >   <span
class="cmti-10x-x-109">k </span><span
class="cmsy-10x-x-109">⟨</span><span
class="cmmi-10x-x-109">k</span><sub><span
class="cmmi-8">nn</span></sub>(<span
class="cmmi-10x-x-109">k</span>)<span
class="cmsy-10x-x-109">⟩ </span><span
class="cmmi-10x-x-109">σ</span><sub><span
class="cmmi-8">k</span></sub> <span class="overline"><span
class="cmmi-10x-x-109">q</span></span>(<span
class="cmmi-10x-x-109">k</span>) <span
class="cmmi-10x-x-109">σ</span><sub><span class="overline"><span
class="cmmi-10x-x-109">q</span></span></sub>
<!--l. 73--><p class="indent" > where <span
class="cmmi-10x-x-109">k </span>is the degree at first layer, <span
class="cmsy-10x-x-109">⟨</span><span
class="cmmi-10x-x-109">k</span><sub><span
class="cmmi-8">nn</span></sub>(<span
class="cmmi-10x-x-109">k</span>)<span
class="cmsy-10x-x-109">⟩ </span>is the average degree of the
neighbours at layer 1 of nodes having degree <span
class="cmmi-10x-x-109">k </span>at layer 1, <span
class="cmmi-10x-x-109">σ</span><sub><span
class="cmmi-8">k</span></sub> is the standard
deviation associated to <span
class="cmsy-10x-x-109">⟨</span><span
class="cmmi-10x-x-109">k</span><sub><span
class="cmmi-8">nn</span></sub>(<span
class="cmmi-10x-x-109">k</span>)<span
class="cmsy-10x-x-109">⟩</span>, <span class="overline"><span
class="cmmi-10x-x-109">q</span></span>(<span
class="cmmi-10x-x-109">k</span>) is the average degree at layer 2 of nodes
having degree equal to <span
class="cmmi-10x-x-109">k </span>at layer 1, and <span
class="cmmi-10x-x-109">σ</span><sub><span class="overline"><span
class="cmmi-10x-x-109">q</span></span></sub> is the standard deviation associated
to <span class="overline"><span
class="cmmi-10x-x-109">q</span></span>(<span
class="cmmi-10x-x-109">k</span>).
<!--l. 73--><p class="indent" > The second file contains a similar list of lines, in the format:
<!--l. 73--><p class="indent" >   <span
class="cmti-10x-x-109">q </span><span
class="cmsy-10x-x-109">⟨</span><span
class="cmmi-10x-x-109">q</span><sub><span
class="cmmi-8">nn</span></sub>(<span
class="cmmi-10x-x-109">q</span>)<span
class="cmsy-10x-x-109">⟩ </span><span
class="cmmi-10x-x-109">σ</span><sub><span
class="cmmi-8">q</span></sub> <span class="overline"><span
class="cmmi-10x-x-109">k</span></span>(<span
class="cmmi-10x-x-109">q</span>) <span
class="cmmi-10x-x-109">σ</span><sub><span class="overline"><span
class="cmmi-10x-x-109">k</span></span></sub>
<!--l. 73--><p class="indent" > with obvious meaning.
<!--l. 80--><p class="noindent" ><span
class="cmbx-10x-x-109">REFERENCE</span>
<!--l. 80--><p class="indent" > V. Nicosia, V. Latora, “Measuring and modeling correlations in multiplex
networks”, <span
class="cmti-10x-x-109">Phys. Rev. E </span><span
class="cmbx-10x-x-109">92</span>, 032805 (2015).
<!--l. 80--><p class="indent" > Link to paper: <a
href="http://journals.aps.org/pre/abstract/10.1103/PhysRevE.92.032805" class="url" ><span
class="cmtt-10x-x-109">http://journals.aps.org/pre/abstract/10.1103/PhysRevE.92.032805</span></a>
<!--l. 80--><p class="indent" > V. Nicosia, G. Bianconi, V. Latora, M. Barthelemy, “Growing multiplex
networks”, <span
class="cmti-10x-x-109">Phys. Rev. Lett. </span><span
class="cmbx-10x-x-109">111</span>, 058701 (2013).
<!--l. 80--><p class="indent" > Link to paper: <a
href="http://prl.aps.org/abstract/PRL/v111/i5/e058701" class="url" ><span
class="cmtt-10x-x-109">http://prl.aps.org/abstract/PRL/v111/i5/e058701</span></a>
<!--l. 80--><p class="indent" > V. Nicosia, G. Bianconi, V. Latora, M. Barthelemy, “Non-linear growth and
condensation in multiplex networks”, <span
class="cmti-10x-x-109">Phys. Rev. E </span><span
class="cmbx-10x-x-109">90</span>, 042807 (2014).
<!--l. 80--><p class="indent" > Link to paper: <a
href="http://journals.aps.org/pre/abstract/10.1103/PhysRevE.90.042807" class="url" ><span
class="cmtt-10x-x-109">http://journals.aps.org/pre/abstract/10.1103/PhysRevE.90.042807</span></a>
<!--l. 3--><div class="crosslinks"><p class="noindent">[<a
href="mammult_docsu34.html" >next</a>] [<a
href="mammult_docsu32.html" >prev</a>] [<a
href="mammult_docsu32.html#tailmammult_docsu32.html" >prev-tail</a>] [<a
href="mammult_docsu33.html" >front</a>] [<a
href="mammult_docsu31.html#mammult_docsu33.html" >up</a>] </p></div>
<!--l. 3--><p class="indent" > <a
id="tailmammult_docsu33.html"></a>
</body></html>
|