get_ddm_from_eigendec | R Documentation |
Returns the diffusion distance matrix when the spectrum (more precisely, the eigendecomposition) of the Laplacian is provided as input (useful to speed up batch calculations).
For instance, the random walk normalised Laplacian I - D^{-1}A, which generates the classical continuous-time random walk over a network, can be easily and obtained from the spectral decomposition of the symmetric normalised Laplacian \mathcal{L} = D^{-\frac{1}{2}} L D^{-\frac{1}{2}} = D^{-\frac{1}{2}} (D - A) D^{-\frac{1}{2}}. More specifically, \bar{L} = I - D^{-1} A = D^{-\frac{1}{2}} \mathcal{L} D^{\frac{1}{2}} and, since \mathcal{L} is symmetric it can be decomposed into \mathcal{L} = ∑_{l = 1}^N λ_l u_l u_l^T, hence
\bar{L} = ∑_{l = 1}^N λ_l u^R_l u^L_l
where u^L_l = u_l^T D^{\frac{1}{2}} and u^R_l = u_l D^{-\frac{1}{2}}.
get_ddm_from_eigendec(tau, Q, Q_inv, lambdas, verbose = FALSE)
tau |
diffusion time (scalar) |
Q |
eigenvector matrix |
Q_inv |
inverse of the eigenvector matrix |
lambdas |
eigenvalues (vector) |
verbose |
whether warnings have to be printed or not |
The diffusion distance matrix D_t, a square numeric matrix of the Euclidean distances between the rows of the stochastic matrix P(t) = e^{-τ L}, where -L is the Laplacian generating a continuous-time random walk (Markov chain) over the network. The matrix exponential is here computed using the given eigendecomposition of the Laplacian matrix e^{-τ L} = Q e^{-τ Λ} Q^{-1}.
Bertagnolli, G., & De Domenico, M. (2021). Diffusion geometry of multiplex and interdependent systems. Physical Review E, 103(4), 042301. doi: 10.1103/PhysRevE.103.042301 arXiv: 2006.13032
get_spectral_decomp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.