Spectral Graph Theory
164 words
1 min read
Visual companion
Python
Type and operator map
Python Week 1: the first filter for runtime behavior
View
Revision summary
What this note is really saying
Short form
# Spectral Graph Theory ## 3.1 Graph Laplacian For graph $G = (V, E)$ with adjacency matrix $A$ and degree matrix $D = \text{diag}(d_1, \dots, d_n)$: $$ \mathbf{L} = \mathbf{D} - \mathbf{A} $$ ### Properties - $\mathbf{L}$ is symmetric positive semidefinite - Smallest eigenvalue $\lambda_1 = 0$ (eigenvector = $\math...

Spectral Graph Theory
3.1 Graph Laplacian
For graph G=(V,E) with adjacency matrix A and degree matrix D=diag(d1,…,dn):
Properties
- L is symmetric positive semidefinite
- Smallest eigenvalue λ1=0 (eigenvector = 1)
- Multiplicity of 0 equals number of connected components
- xTLx=∑(i,j)∈E(xi−xj)2
3.2 Spectral Clustering
pythonfrom sklearn.cluster import KMeans import numpy as np # Affinity matrix A = np.random.randn(100, 100) A = A @ A.T # make symmetric # Graph Laplacian D = np.diag(np.sum(A, axis=1)) L = D - A # Eigendecomposition eigvals, eigvecs = np.linalg.eigh(L) # Use bottom k eigenvectors for clustering k = 3 X = eigvecs[:, :k] kmeans = KMeans(n_clusters=k).fit(X) labels = kmeans.labels_
3.3 Cheeger's Inequality
2λ2≤ϕ(G)≤2λ2Where ϕ(G) is the conductance and λ2 is the second smallest eigenvalue of L.
Join Discord
PreviousRandomized SVDNextJohnson-Lindenstrauss