Functions for stochastic matrix modifications.
1 2 3 4 5
Probability of 'teleportation'.
Input stochastic matrix.
Modification logic behind
teleport() assumes that at each step
of Markov chain (described by column-stochastic matrix) the decision is made
whether to change state according to stochastic matrix or to 'teleport' to
any state with equal probability. Probability of 'teleport' is
teleport_prob. This modification is useful because it ensures
irreducibility of stochastic matrix (with
teleport_prob in (0; 1)).
Note that in order to obtain modifier one should call function
teleport() with some parameter.
vote_self() modify columns with elements only equal to
0. The former fills them with
1/nrow(stoch) and the latter changes only the
respective diagonal element to 1. This is equivalent to jump to any state
with equal probability and to stay in the current state respectively.
teleport() returns a modifier function.
vote_self() are modifier functions and return modified
version of input stochastic matrix.
1 2 3 4 5 6 7 8
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.