Description Usage Arguments Value Examples
get_distribution_from_path computes the probability distribution of a random walk
following a given path between the different parts of the input multipartite
graph. It starts at a given part with an initial probability distribution, then
randomly follows the links of the graph between the different parts according to the
input path, then stops at the last specified part.
1 2 | get_distribution_from_path(graph, path, initial_distribution = NULL,
initial_node = NULL)
|
graph |
A multipartite graph obtained by calling the |
path |
A vector of character strings giving the path that the random walk should
follow between the different parts of the input multipartite |
initial_distribution |
(optional) A vector of floats in [ |
initial_node |
(optional) A character string giving the label of a node in the first
part of the input |
A vector of floats in [0,1] and summing to 1 giving the
probability distribution of the random walk when arriving at the last part, after having
followed the input path within the different parts of the graph.
1 2 3 4 5 6 7 | data (tripartite_example)
graph <- get_multipartite (data=tripartite_example)
path <- c(2,1,2,3)
as.matrix (get_distribution_from_path (graph, path))
as.matrix (get_distribution_from_path (graph, path, initial_distribution=c(1/3,0,0,2/3)))
as.matrix (get_distribution_from_path (graph, path, initial_node='i2'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.