pyemma.msm.estimation.tmatrix_sampler¶
-
pyemma.msm.estimation.
tmatrix_sampler
(C, reversible=False, mu=None, T0=None)¶ Generate transition matrix sampler object.
Parameters: - C ((M, M) ndarray or scipy.sparse matrix) – Count matrix
- reversible (bool) – If true sample from the ensemble of transition matrices restricted to those obeying a detailed balance condition, else draw from the whole ensemble of stochastic matrices.
- mu (array_like) – The stationary distribution of the transition matrix samples.
- T0 (ndarray, shape=(n, n) or scipy.sparse matrix) – Starting point of the MC chain of the sampling algorithm. Has to obey the required constraints.
Returns: sampler
Return type: A :py:class:dense.tmatrix_sampler.TransitionMatrixSampler object that can be used to generate samples.
Notes
The transition matrix sampler generates transition matrices from the posterior distribution. The posterior distribution is given as a product of Dirichlet distributions
\[\mathbb{P}(T|C) \propto \prod_{i=1}^{M} \left( \prod_{j=1}^{M} p_{ij}^{c_{ij}} \right)\]The method can generate samples from the posterior under the follwing two constraints