Compute the Euclidean distance of adjacency spectral embeddings
Value
An \(n \times n\) matrix \(D\), where \(D_{i,j}\) represents the distance between nodes \(v_i\) and \(v_j\).
Details
For adjacency matrix \(\boldsymbol{A}\) with \(n\) nodes,
let \(\hat{\boldsymbol{\Lambda}} \in \mathbb{R}^{d \times d}\)
be the diagonal matrix formed by the top d
largest-magnitude eigenvalues
of the adjacency matrix and \(\hat{\boldsymbol{U}} \in \mathbb{R}^{n \times d}\)
be the matrix with the corresponding eigenvectors as its columns.
The adjacency spectral embedding of \(\boldsymbol{A}\) is
\(\hat{\boldsymbol{X}} = \hat{\boldsymbol{U}}\hat{\boldsymbol{\Lambda}}^{1/2} \in \mathbb{R}^{n \times d}\).
Then, \(D_{i,j}\) is the Euclidean norm of \(\hat{\boldsymbol{X}}_{i, \cdot}\) and \(\hat{\boldsymbol{X}}_{j, \cdot}\).