Day 4
Distance can be in any units
Euclidean vs. Manhattan distances
p
q
Can you think of any third distance?
Graphs
Not just any rendering of data;
Model of pair-wise connections
The Bridge Problem:
Euler walk: each edge once, end at start
Must have vertices with even edges
Each move can’t disconnect the graph
We se graphs all over
Physical maps
Regulatory networks
Probabilities
P(B|A)
A
B
Nodes (vertices, points)
Edges
Tree of life
Relatedness of all genetically identified species (2.3 million)
www.scientificamerican.com/article/
all-2-3-million-species-are-mapped-into-a-single-circle-of-life1/
Cortical connections
Degree of MRI-evinced connectedness between brain regions during visual tasks
https://scholar.harvard.edu/merabetlab/circos
Semantic networks
Mota et al., Sci Rep. 2014
Completeness, directedness
Directed: edges have direction
Undirected: edges are symmetrical
Complete: all connections
(Directed = undirected)
Recall Bayes Nets
Directed. Why?
A
B
C
D
E
A
B
C
D
E
undirected
directed
A
B
C
D
E
complete
Graphs as matrixes
Edges as vectors
A B C D E
A [ 0 1 0 0 0]
B [ 0 0 1 0 0]
C [ 0 0 0 1 0]
D [ 0 0 0 0 1]
E [ 0 0 0 0 0]
A
B
C
D
E
To
From
Adjacency matrix
We use something like Markov Models to live
Brains like Gandalf: Grey vs. White
(H)MMs help model complex biology
Model neurons as Graphs
Matrixes define Edge Weights between Nodes
Can this capture the complexity of thought?
A
B
C
D
p1
p2
p3
p4
p5
p6
p0
Markov chains
Will my neuronal receptor activate?
A
B
C
D
p1
p2
p3
p4
p5
p6
A: Docked
B: Diffusing
C: Bound receptor
D: Degraded
State
transition
p0
Fill in values: literature, experiments, guesses
Transition matrices
A B C D
A [ p0 p1 0 0 ]
B [ 0 p2 p3 p6 ]
C [ 0 p5 p4 0 ]
D [ 0 0 0 0 ]
A B C D
A [ 0.8 0.2 0 0 ]
B [ 0 0.7 0.1 0.2 ]
C [ 0 0.9 0.1 0 ]
D [ 0 0 0 0 ]
P([A,B]) * P([B,C]) * P([C,C]) = 0.2 * 0.1 * 0.1 = 0.002
A
B
C
D
p1
p2
p3
p4
p5
p6
p0
One reason nature likes massive redundancy
is that it’s bad at its job…
(neurotransmitter molecules, fish eggs, etc)
Sums to 1 (probability)
Topology
Network structure can oscillate
Think about social networks: You’re connected to more people when you’re awake than when you’re asleep:
“network plasticity” – integral in learning, adaptation
Wiegert, Oertner. PNAS. 2013.
Coupled oscillators
Coupling implies energy transfer
Coupling strength is a continuous variable
Able to be modeled with classical physics Enables network resilience / plasticity
k
Coupled oscillators synchronize
Cardiac pacemaker cells
Brain regions
Organs (metab regulation)
Voles (predator avoidance)
Shan et al., Neuron. 2020.
Suprachiasmatic nucleus
Kuramoto networks
Common oscillator network model
Position as phase
oscillators
coupling
freq
Classic Kuramoto model: fireflies!
Good Night
Bad Night
Temperature
Heart Rate
EGG power
The body also sleeps! (beyond EEG)
Periodic modulation of periodic functions
Ono, Honma, Honma. Sci Rep. 2015.
Smarr et al., J Neurosci, 2019
Multiscale co-oscillation modeling example
Coherence of wavelet of wavelet…
wavelets
WaveCoh
Low High
Coherence
Smarr et al., J Neurosci, in revision
Q175-/-
Q175+/-
Q175+/+
Into HD
State dependent graphs
Properties of edges and nodes can be conditional
Conditions can be approximated as discrete states.
Mutual information and correlations may change as signals change, updating graph values
Oscillators are a predictable version of this: day and night modify which genes can be expressed and which pathways are available
A word on data visualization
Only include what you want others to focus on
Don’t be afraid of scale as context
1
-1
A word on data visualization
Less is more
Contrast, closeness
Big fonts!!! Small fonts are less immediately clear even when they’re legible
Everything adds meaning or noise
Compare choices
Properties to map with color
Agglomerative clustering
Cluster analysis
Grouping objects together based on their relationship.
Depending on distance metric
Depending on order of measures
Tons of kinds of clustering!
Single linkage
“Nearest-Neighbor”:
Choose the clusters with the shortest distance between the closest object in one cluster and the closest object in the other cluster.
Complete linkage
“Furthest-Neighbor”:
Choose the clusters with the shortest distance between the furthest object in one cluster and the furthest object in the other cluster.
Average linkage
Choose the clusters with the shortest average distance all objects one cluster and all objects in the other cluster.
Centroid linkage
Choose the clusters with the shortest distance between the centroid of one cluster and the centroid of the other cluster.
The K-means clustering algorithm
Where µj is the mean of cluster Sj.
Mean shift clustering
Density-Based Spatial Clustering of Applications with Noise DBSCAN
Viswanath et al., Nat Dig Med, 2024
Physiotypes can be data-drive (unintuitive)
We can map graphs onto graphs to track instability of cluster identify
Weeks of sleep fall into clusters.
People live many weeks, so people
Live across clusters!
HW 4. Relational features
Groups of 2
Use your features to group days and individuals
Cluster days based on feature values and/or make a graph model relating days
Do clusters split more by female / male, or by estrous / non estrous?
Explain the way you assigned groups/clusters/edge weights.