deeptime.markov.tools.estimation.tmatrix_cov¶
- deeptime.markov.tools.estimation.tmatrix_cov(C, k=None)¶
Covariance tensor for non-reversible transition matrix posterior.
- Parameters:
C ((M, M) ndarray or scipy.sparse matrix) – Count matrix
k (int (optional)) – Return only covariance matrix for entires in the k-th row of the transition matrix
- Returns:
cov – Covariance tensor for transition matrix posterior
- Return type:
(M, M, M) ndarray
Notes
The posterior of non-reversible transition matrices is
\[\mathbb{P}(T|C) \propto \prod_{i=1}^{M} \left( \prod_{j=1}^{M} p_{ij}^{c_{ij}} \right) \]Each row in the transition matrix is distributed according to a Dirichlet distribution with parameters given by the observed transition counts \(c_{ij}\).
The covariance tensor \(\text{cov}[p_{ij},p_{kl}]=\Sigma_{i,j,k,l}\) is zero whenever \(i \neq k\) so that only \(\Sigma_{i,j,i,l}\) is returned.