msmbuilder.msm_analysis.get_reversible_eigenvectors

msmbuilder.msm_analysis.get_reversible_eigenvectors(t_matrix, k, populations=None, right=False, dense_cutoff=50, normalized=False, **kwargs)[source]

Find the k largest left eigenvalues and eigenvectors of a reversible row-stochastic matrix, sorted by eigenvalue magnitude

Parameters:

t_matrix : sparse or dense matrix

The row-stochastic transition probability matrix

k : int

The number of eigenpairs to calculate. The k eigenpairs with the highest eigenvalues will be returned.

populations : np.ndarray, optional

The equilibrium, stationary distribution of t_matrix. If not supplied, it can be re-computed from t_matrix. But this substantially increases the runtime of the routine, so if the stationary distribution is known, it’s more efficient to supply it.

right : bool, optional

The default behavior is to compute the left eigenvectors of the transition matrix. This option may be invoked to instead compute the right eigenvectors.

dense_cutoff : int, optional

use dense eigensolver if dimensionality is below this

normalized : bool, optional

normalize the vectors such that

\[\phi_i^T \psi_j = \delta_{ij}\]

where \(\phi_i\) is the \(i^{th}\) left eigenvector, and \(\psi_j\) is the \(j^{th}\) right eigenvector

Returns:

eigenvalues : ndarray

1D array of eigenvalues

eigenvectors : ndarray

2D array of eigenvectors

Other Params:

**kwargs :

Additional keyword arguments are passed directly to scipy.sparse.linalg.eigsh. Refer to the scipy documentation for further details.

See also

get_eigenvectors
computes the eigenpairs of a general row-stochastic matrix, without requiring that the matrix be reversible.

scipy.sparse.linalg.eigsh

Notes

  • A reversible transition matrix is one that satisifies the detailed balance condition

    \[\pi_i T_{i,j} = \pi_j T_{j,i}\]
  • A reversible transition matrix satisifies a number of special conditions. In particular, it is similar to a symmetric matrix \(S_{i, j} = \sqrt{\frac{pi_i}{\pi_j}} T_{i, j} = S_{j, i}\). This property enables a much more robust solution to the eigenvector problem, because of the superior numerical stability of hermetian eigensolvers.

Versions