Skip to content

Commit 37d7f89

Browse files
committed
update class 20
1 parent f635fca commit 37d7f89

1 file changed

Lines changed: 57 additions & 55 deletions

File tree

notebooks/class_20/class_20_temporal_networks.ipynb

Lines changed: 57 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -212,52 +212,71 @@
212212
"source": [
213213
"## Temporal networks are everywhere and also every freakin' thing\n",
214214
"\n",
215+
"(Controversial claim?) **Nearly every system we study is better described as a sequence of interactions in time rather than a static web of ties.**\n",
215216
"\n",
216-
"- Person-to-person communication\n",
217-
" - I. Emails\n",
218-
" - II.Mobile phone calls, or messages\n",
219-
" - III.Various online activities\n",
220-
"- One-to many communication\n",
221-
" - I. Twitter\n",
222-
" - II.Instagram\n",
223-
" - III.Wikipedia\n",
224-
"- Physical Proximity\n",
225-
" - I. Reality mining project\n",
226-
" - II. SocioPatterns project\n",
227-
"- Cell biology\n",
228-
" - I. Proteins interactions\n",
229-
" - II. Gene regulatory networks\n",
230-
" - III. Metabolic networks\n",
231-
"- Infrastructural Systems\n",
232-
" - I. Air transportation\n",
233-
" - II. Train routes\n",
234-
" - III. Bus routes\n",
235-
"- Neural and brain networks\n",
236-
" - I. Activation and correlation among different brain areas\n",
237-
" - II. Neuronal connectivity\n",
238-
"- Ecological systems\n",
239-
" - I. Food webs\n",
240-
" - II. Mobility and proximity of animals\n"
217+
"What matters is not only who is connected to whom, but when and in what order events occur—because the ordering of contacts constrains causality: information, infection, and influence can only flow along time-respecting paths. This perspective unifies settings that look very different on the surface—communication, proximity, biology, infrastructure, brains, and ecology—yet share recurring temporal signatures such as burstiness, diurnal rhythms, and nonstationarity (e.g., Holme & Saramäki, 2012; Masuda & Lambiotte, 2016).\n",
218+
"\n",
219+
"\n",
220+
"Across all of these domains, three methodological themes recur: (i) represent interactions as contact sequences or *time-unfolded* graphs so that ordering is explicit; (ii) choose analysis windows deliberately, because window size can flip conclusions; and (iii) benchmark against temporal nulls (time-shuffle, endpoint-shuffle, inter-event-preserving) to isolate what is genuinely temporal from what is a by-product of sampling. The result is a notion of structure that is causal, not just topological...and that’s the point of studying temporal networks at all!\n",
221+
"\n"
241222
]
242223
},
243224
{
244225
"cell_type": "markdown",
245226
"metadata": {},
246227
"source": [
247-
"____\n",
248-
"### Time is relative!\n",
249-
"* $t_G$ describes the evolution of the network\n",
250-
"* $t_P$ describes the evolution of the process\n",
251-
"* scale of $t_G/t_P$:\n",
228+
"#### 1) Person-to-person communication (email, calls/messages, online DMs)\n",
229+
"\n",
230+
"* Events as ((u,v,t,\\Delta t)); ordering constrains who can reach whom.\n",
231+
"* Bursty, correlated gaps → earliest-arrival/fastest paths matter.\n",
232+
"* Temporal centrality (foremost/fastest) can invert static rankings.\n",
233+
"* Window choice (1h vs 24h) changes reachability and “influence.”\n",
234+
"\n",
235+
"\n",
236+
"#### 2) One-to-many communication (Twitter, Instagram, Wikipedia)\n",
237+
"\n",
238+
"* Broadcasts form cascades whose shape depends on timing, not just topology.\n",
239+
"* Diurnal/session rhythms gate who can plausibly influence whom.\n",
240+
"* Temporal trees (time-respecting) differ from static diffusion assumptions.\n",
241+
"* Timestamp shuffles separate temporal effects from follower/editor structure.\n",
242+
"\n",
243+
"\n",
244+
"#### 3) Physical proximity (Reality Mining, SocioPatterns)\n",
245+
"\n",
246+
"* Minute-scale contact sequences with strong daily/weekly cycles.\n",
247+
"* Static aggregation invents paths; time-respecting reachability is smaller/slower.\n",
248+
"* Temporal motifs (ordered triads) reveal handoffs across classes/sessions.\n",
249+
"* Superspreaders can be session-specific, not globally high-degree.\n",
250+
"\n",
252251
"\n",
253-
"<!-- ![](images/timescale.png) -->"
252+
"#### 4) Infrastructural systems (air, train, bus; GTFS/timetables)\n",
253+
"\n",
254+
"* Edges exist only at scheduled times; feasibility = ordering-consistent routes.\n",
255+
"* Optimize earliest-arrival/fastest, not topological shortest path.\n",
256+
"* Rush-hour centrality/bottlenecks are time-localized.\n",
257+
"* Delays = timestamp perturbations; robustness is inherently temporal.\n",
258+
"\n",
259+
"\n",
260+
"#### 5) Biological & ecological dynamics (PPI, GRNs, metabolism; food webs, animal mobility)\n",
261+
"\n",
262+
"* Edges switch with state/season; viable paths are transient.\n",
263+
"* Direction/irreversibility require time-ordered paths (causal feasibility).\n",
264+
"* Temporal multilayers recover control points and seasonal bottlenecks.\n",
265+
"* Aggregation masks phase-specific articulation nodes and bridges.\n"
254266
]
255267
},
256268
{
257269
"cell_type": "markdown",
258270
"metadata": {},
259271
"source": [
260-
"_________\n",
272+
"____\n",
273+
"### Time is relative!\n",
274+
"* $t_G$ describes the evolution of the network\n",
275+
"* $t_P$ describes the evolution of the process\n",
276+
"* scale of $t_G/t_P$:\n",
277+
"\n",
278+
"<!-- ![](images/timescale.png) -->\n",
279+
"\n",
261280
"### Representation\n",
262281
"* Static network: adjacency matrix $A_{ij}$\n",
263282
"\n",
@@ -938,29 +957,12 @@
938957
"\n",
939958
"\n",
940959
"# Draw the nodes of the network\n",
941-
"nx.draw_networkx_nodes(\n",
942-
" G_agg, # The aggregated temporal network graph\n",
943-
" pos, # The positions of nodes (should be precomputed separately)\n",
944-
" node_color=ncs, # Color nodes based on their eigenvector centrality scores\n",
945-
" node_size=40, # Size of the nodes\n",
946-
" linewidths=0.5, # Border width of nodes\n",
947-
" edgecolors='.1', # Edge color of the nodes (dark grey)\n",
948-
" cmap=plt.cm.magma_r, # Node colormap\n",
949-
" vmin=0, vmax=1.1,\n",
950-
" ax=ax\n",
951-
")\n",
952-
"\n",
953-
"nx.draw_networkx_edges(\n",
954-
" G_agg, # The aggregated temporal network graph\n",
955-
" pos, # The positions of nodes\n",
956-
" width=ews, # Edge widths calculated above\n",
957-
" edge_color=ecs, # Edge colors calculated above\n",
958-
" edge_cmap=plt.cm.Greys, # Use the Greys colormap for edges\n",
959-
" edge_vmin=0.45, # Minimum value for edge color normalization\n",
960-
" edge_vmax=1.0, # Maximum value for edge color normalization\n",
961-
" alpha=0.7, # Transparency of edges\n",
962-
" ax=ax\n",
963-
")\n",
960+
"nx.draw_networkx_nodes(G_agg,pos, node_color=ncs, node_size=40, linewidths=0.5,\n",
961+
" edgecolors='.1', cmap=plt.cm.magma_r, vmin=0, vmax=1.1, ax=ax)\n",
962+
"\n",
963+
"nx.draw_networkx_edges(G_agg, pos, width=ews, edge_color=ecs, edge_cmap=plt.cm.Greys,\n",
964+
" edge_vmin=0.45, edge_vmax=1.0, alpha=0.7, ax=ax)\n",
965+
"\n",
964966
"\n",
965967
"ax.set_title('Time-Aggregated Temporal Network')\n",
966968
"ax.set_axis_off()\n",

0 commit comments

Comments
 (0)