Description Usage Arguments Value Examples
get_diversity_from_path
computes diversity values of the probability distribution
of a random walk following a 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. The
implemented diversity measures all belong to the parametrized family of "True Diversity"
measures. They can either be specified by their diversity order
in
[0
,Inf
[ or by their measure
name when it corresponds to classical
instances such as the richness, the Shannon entropy, the Herfindahl-Hirschman index,
or the Berger-Parker index.
1 2 3 |
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 |
type |
Either |
mean_distribution |
(optional, only when |
initial_distribution |
(optional, only when |
initial_node |
(optional, only when |
order |
A vector of positive floats (possibly including |
measure |
A vector of strings giving the names of the diversity measures to compute.
Possible values are |
A matrix (or a vector) of positive floats giving the individual diversity values
of the random walks following the input path
(or their mean, or the collective
diversity).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data (tripartite_example)
graph <- get_multipartite (data=tripartite_example)
path <- c(1,2,3)
get_diversity_from_path (graph, path, 'individual', measure=c('entropy','herfindahl'))
get_diversity_from_path (graph, path, 'individual', order=c(0,1,Inf))
# Mean of individual diversities
get_diversity_from_path (graph, path, 'mean')
get_diversity_from_path (graph, path, 'mean', mean_distribution=c(1/3,2/3))
# Collective diversities
get_diversity_from_path (graph, path, 'collective')
get_diversity_from_path (graph, path, 'collective', initial_distribution=c(0.75,0.25))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.