analysis - MSM analysis functions (msmtools.analysis)

This module contains functions to analyze a created Markov model, which is specified with a transition matrix T.


is_transition_matrix(T[, tol]) Check if the given matrix is a transition matrix.
is_tmatrix(T[, tol]) Check if the given matrix is a transition matrix.
is_rate_matrix(K[, tol]) Check if the given matrix is a rate matrix.
is_connected(T[, directed]) Check connectivity of the given matrix.
is_reversible(T[, mu, tol]) Check reversibility of the given transition matrix.


Decomposition routines use the scipy LAPACK bindings for dense numpy-arrays and the ARPACK bindings for scipy sparse matrices.

stationary_distribution(T) Compute stationary distribution of stochastic matrix T.
statdist(T) Compute stationary distribution of stochastic matrix T.
eigenvalues(T[, k, ncv, reversible, mu]) Find eigenvalues of the transition matrix.
eigenvectors(T[, k, right, ncv, reversible, mu]) Compute eigenvectors of given transition matrix.
rdl_decomposition(T[, k, norm, ncv, ...]) Compute the decomposition into eigenvalues, left and right eigenvectors.
timescales(T[, tau, k, ncv, reversible, mu]) Compute implied time scales of given transition matrix.

Expected counts

expected_counts(T, p0, N) Compute expected transition counts for Markov chain with n steps.
expected_counts_stationary(T, N[, mu]) Expected transition counts for Markov chain in equilibrium.

Passage times

mfpt(T, target[, origin, tau, mu]) Mean first passage times (from a set of starting states - optional) to a set of target states.

Committors and PCCA

committor(T, A, B[, forward, mu]) Compute the committor between sets of microstates.
pcca(T, m) Compute meta-stable sets using PCCA++ _[1] and return the membership of all states to these sets.


fingerprint_correlation(T, obs1[, obs2, ...]) Dynamical fingerprint for equilibrium correlation experiment.
fingerprint_relaxation(T, p0, obs[, tau, k, ncv]) Dynamical fingerprint for relaxation experiment.
expectation(T, a[, mu]) Equilibrium expectation value of a given observable.
correlation(T, obs1[, obs2, times, maxtime, ...]) Time-correlation for equilibrium experiment.
relaxation(T, p0, obs[, times, k, ncv]) Relaxation experiment.

Sensitivity analysis

stationary_distribution_sensitivity(T, j) Sensitivity matrix of a stationary distribution element.
eigenvalue_sensitivity(T, k) Sensitivity matrix of a specified eigenvalue.
timescale_sensitivity(T, k) Sensitivity matrix of a specified time-scale.
eigenvector_sensitivity(T, k, j[, right]) Sensitivity matrix of a selected eigenvector element.
mfpt_sensitivity(T, target, i) Sensitivity matrix of the mean first-passage time from specified state.
committor_sensitivity(T, A, B, i[, forward]) Sensitivity matrix of a specified committor entry.
expectation_sensitivity(T, a) Sensitivity of expectation value of observable A=(a_i).