msmtools.estimation.prior_const

msmtools.estimation.prior_const(C, alpha=0.001)

Constant prior for given count matrix.

Parameters:
  • C ((M, M) ndarray or scipy.sparse matrix) – Count matrix
  • alpha (float (optional)) – Value of prior counts
Returns:

B – Prior count matrix

Return type:

(M, M) ndarray

Notes

The prior is defined as

\[\begin{array}{rl} b_{ij}= \alpha & \forall i, j \end{array}\]

Examples

>>> import numpy as np
>>> from msmtools.estimation import prior_const
>>> C = np.array([[10, 1, 0], [2, 0, 3], [0, 1, 4]])
>>> B = prior_const(C)
>>> B
array([[ 0.001,  0.001,  0.001],
       [ 0.001,  0.001,  0.001],
       [ 0.001,  0.001,  0.001]])