msmbuilder.tpt.mfpts¶
-
msmbuilder.tpt.
mfpts
(msm, sinks=None, lag_time=1.0)¶ Gets the Mean First Passage Time (MFPT) for all states to a set of sinks.
Parameters: msm : msmbuilder.MarkovStateModel
MSM fit to the data.
sinks : array_like, int, optional
- Indices of the sink states. There are two use-cases:
- None [default] : All MFPTs will be calculated, and the
result is a matrix of the MFPT from state i to state j. This uses the fundamental matrix formalism.
- list of ints or int : Only the MFPTs into these sink
states will be computed. The result is a vector, with entry i corresponding to the average time it takes to first get to any sink state from state i
lag_time : float, optional
Lag time for the model. The MFPT will be reported in whatever units are given here. Default is (1) which is in units of the lag time of the MSM.
Returns: mfpts : np.ndarray, float
MFPT in time units of lag_time, which depends on the input value of sinks:
- If sinks is None, then mfpts’s shape is (n_states, n_states).
Where mfpts[i, j] is the mean first passage time to state j from state i.
- If sinks contains one or more states, then mfpts’s shape
is (n_states,). Where mfpts[i] is the mean first passage time from state i to any state in sinks.
References
[R67] Grinstead, C. M. and Snell, J. L. Introduction to Probability. American Mathematical Soc., 1998. - As of November 2014, this chapter was available for free online:
- http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/Chapter11.pdf