View source: R/get_diff_prob_matrix.R
get_laplacian | R Documentation |
Returns a specific Laplacian matrix corresponding to the chosen dynamics type and network. The available types are:
for the classical combinatorial Laplacian matrix; it governs the diffusion dynamics on the network
for the Laplacian matrix normalized by degree matrix, the so-called classical random walk normalized Laplacian; it governs stochastic walks on the network
for the Laplacian matrix normalized to be symmetric; it governs quantum walks on the network
the maximal-entropy random walk (RW) normalized Laplacian; it governs stochastic walks on the network, in which the random walker moves according to a maximal-entropy RW [1].
The maximum entropy random walk (MERW) chooses the stochastic matrix which
maximizes H(S), so that the walker can explore every walk of the
same length with equal probability.
Let λ_N, φ be the leading eigenvalue and
corresponding right eigenvector of the adjacency matrix A. Then the
transition matrix corresponding to the discrete-time random walk is
Π_{ij} = \frac{A_{ij}}{λ_N}\frac{φ_j}{φ_i}.
The MERW (normalized) Laplacian is then given by I - Π.
Note that we use the notation Π and Pi
to avoid confusion
with the abbreviation T
for the logical TRUE
.
get_laplacian(g, type = "Laplacian", weights = NULL, verbose = TRUE) getLaplacianMatrix(g, type = "Laplacian", weights = NULL, verbose = TRUE)
g |
a network |
type |
the type of Laplacian matrix. default |
weights |
edge weights, representing the strength/intensity (not the cost!) of each link. if weights is NULL (the default) and g has an edge attribute called weight, then it will be used automatically. If this is NA then no weights are used (even if the graph has a weight attribute). |
verbose |
default |
the ('type') Laplacian matrix of network 'g'
[1] Burda, Z., et al. (2009). Phys Rev. Lett. 102 160602(April), 1–4. doi: 10.1103/PhysRevLett.102.160602
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.