LAPM.dtmc¶
Module for discrete-time Markov chains (DTMCs).
Classes
|
Class of discrete time Markov chains. |
Exceptions
Generic error occurring in this module. |
Detailed module content¶
- class LAPM.dtmc.DTMC(beta, P)[source]¶
Bases:
objectClass of discrete time Markov chains.
- beta¶
initial distribution
- Type
SymPy dx1-matrix
- P¶
transition probability matrix
- Type
SymPy dxd-matrix
- property ergodic_entropy¶
Return the ergodic entropy per jump.
- Returns
\(\sum\limits_{j=1}^n \pi_j\sum\limits_{i=1}^n\) \(-p_{ij}\,\log p_{ij}\)
- Return type
SymPy expression or float
See also
stationary_distribution(): Return the (symbolic) stationary distribution.
- property expected_number_of_jumps¶
Return the (symbolic) expected number of jumps before absorption.
- Returns
\(\sum\limits_{i=1}^n [M\,\beta]_i\)
- Return type
SymPy expression or numerical value
See also
fundamental_matrix(): Return the (symbolic) fundamental matrix.- Raises
Error – if \(\operatorname{det}(I-P)=0\), no absorbing Markov chain is given
- property fundamental_matrix¶
Return the (symbolic) fundamental matrix.
- Returns
\(M=(I-P)^{-1}\)
- Return type
SymPy or numerical dxd-matrix
- Raises
Error – if \(\operatorname{det}(I-P)=0\), no absorbing Markov chain is given
- property n¶
Return the dimension of the Markov chain.
- Type
int
- property stationary_distribution¶
Return the (symbolic) stationary distribution.
- Returns
- stationary distribution vector \(\pi\)
\(P\,\pi=\pi,\quad \sum\limits_{j=1}^n \pi_j=1\)
- Return type
SymPy matrix