get_distance_matrix_from_T {diffudist} | R Documentation |
Diffusion distance matrix from a custom transition matrix
Description
Returns a matrix where each entry encodes the diffusion distance between two nodes of a network, given a transition matrix on the network and a diffusion time.
The diffusion distance at time between nodes
is defined as
with
indicating the i-th row of the stochastic matrix
and
representing the probability (row) vector of a random walk dynamics
corresponding to the initial condition
, i.e. the random
walker is in node
at time
with probability 1.
The Laplacian is the normalised laplacian corresponding to the
given transition matrix, i.e.
.
Usage
get_distance_matrix_from_T(Pi, tau, verbose = TRUE)
get_DDM_from_T(Pi, tau, verbose = TRUE)
get_distance_matrix_from_Pi(Pi, tau, verbose = TRUE)
get_DDM_from_Pi(Pi, tau, verbose = TRUE)
Arguments
Pi |
a transition matrix (it should be a stochastic matrix) |
tau |
diffusion time |
verbose |
default TRUE |
Value
The diffusion distance matrix , a square numeric matrix
of the
-norm distances between posterior probability vectors, i.e.
Euclidean distances between the rows of the stochastic matrix
, where
is the generator of the
continuous-time random walk (Markov chain) corresponding to the
discrete-time transition matrix
Pi
.
References
De Domenico, M. (2017). Diffusion Geometry Unravels the Emergence of Functional Clusters in Collective Phenomena. Physical Review Letters. doi:10.1103/PhysRevLett.118.168301
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
See Also
get_distance_matrix get_diffusion_probability_matrix,
get_diffusion_probability_matrix_from_T
Examples
g <- igraph::sample_pa(10, directed = FALSE)
dm <- get_distance_matrix(g, tau = 1)