MarkovChain
The MarkoveChain
class supports the creation and use of Discrete-Time Markov Chains (DTMC)s. Transient solution: compute the next state p = π * a where π is the current state probability vector and a is the transition probability matrix. Equilibrium solution (steady-state): solve for π in π = π * a.
Value parameters
- a
-
the transition probability matrix
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Animate this Markov Chain. Place the nodes around a circle and connect them if there is a such a transition.
Animate this Markov Chain. Place the nodes around a circle and connect them if there is a such a transition.
Attributes
Check whether the transition matrix is stochastic (i.e., square, nonnegative, and rows sum to one).
Check whether the transition matrix is stochastic (i.e., square, nonnegative, and rows sum to one).
Attributes
Compute the limiting probabilistic state π * a^k as k -> infinity, by solving a left eigenvalue problem: π = π * a => π * (a - I) = 0, where the eigenvalue is 1. Solve for π by computing the left nullspace of the a - I matrix and then normalize π so it adds to 1.
Compute the limiting probabilistic state π * a^k as k -> infinity, by solving a left eigenvalue problem: π = π * a => π * (a - I) = 0, where the eigenvalue is 1. Solve for π by computing the left nullspace of the a - I matrix and then normalize π so it adds to 1.
Attributes
Compute the next probabilistic state π * a.
Compute the next probabilistic state π * a.
Value parameters
- π
-
the current state probability vector
Attributes
Compute the k-th next probabilistic state π * a^k.
Compute the k-th next probabilistic state π * a^k.
Value parameters
- k
-
compute for the k-th time-step/epoch
- π
-
the current state probability vector
Attributes
Simulate the discrete-time Markov chain, by starting in state i0 and after the state's holding, making a transition to the next state according to the jump matrix.
Simulate the discrete-time Markov chain, by starting in state i0 and after the state's holding, making a transition to the next state according to the jump matrix.
Value parameters
- endTime
-
the end time for the simulation
- i0
-
the initial/start state
Attributes
Convert this discrete-time Markov Chain to a string.
Convert this discrete-time Markov Chain to a string.
Attributes
- Definition Classes
-
Any