Reversible first order master equation model
This model fits a continuous-time Markov model (master equation) from discrete-time integer labeled timeseries. The key estimated attribute, ratemat_, is a matrix containing the estimated first order rate constants between the states. See [1] for details.
| Parameters: | lag_time : int 
 n_timescales : int, optional 
 ergodic_cutoff : int, default=1 
 sliding_window : bool, default=True 
 verbose : bool, default=False 
 guess : {‘log’, ‘pseudo’, array}, default=’log’ 
 | 
|---|
See also
References
| [R30] | R. T. McGibbon and V. S. Pande, Efficient maximum likelihood parameterization of continuous-time Markov processes.” J. Chem. Phys. 143, 034109 (2015) http://dx.doi.org/10.1063/1.4926516 | 
Attributes
| n_states_ | (int) The number of states | 
| ratemat_ | (np.ndarray, shape=(n_states_, n_state_)) The estimated state-to-state transition rates. | 
| transmat_ | (np.ndarray, shape=(n_states_, n_state_)) The estimated state-to-state transition probabilities over an interval of 1 time unit. | 
| timescales_ | (array of shape=(n_timescales,)) Estimated relaxation timescales of the model. | 
| populations_ | (np.ndarray, shape=(n_states_,)) Estimated stationary probability distribution over the states. | 
| countsmat_ | (array_like, shape = (n_states_, n_states_)) Number of transition counts between states, at a time delay of lag_time countsmat_[i, j] is counted during fit(). | 
| optimizer_state_ | (object) Contains information about the optimization termination. | 
| mapping_ | (dict) Mapping between “input” labels and internal state indices used by the counts and transition matrix for this Markov state model. Input states need not necessarily be integers in (0, ..., n_states_ - 1), for example. The semantics of mapping_[i] = j is that state i from the “input space” is represented by the index j in this MSM. | 
| theta_ | (array of shape n*(n+1)/2 or shorter) Optimized set of parameters for the model. | 
| information_ | (np.ndarray, shape=(len(theta_), len(theta_))) Approximate inverse of the hessian of the model log-likelihood evaluated at theta_. | 
| eigenvalues_ | ( array of shape=(n_timescales+1)) Largest eigenvalues of the rate matrix. | 
| left_eigenvectors_ | (array of shape=(n_timescales+1)) Dominant left eigenvectors of the rate matrix. | 
| right_eigenvectors_ | (array of shape=(n_timescales+1)) Dominant right eigenvectors of the rate matrix, | 
Methods
| draw_samples(sequences, n_samples[, ...]) | Sample conformations for a sequences of states. | 
| fit(sequences[, y]) | |
| fit_transform(X[, y]) | Fit to data, then transform it. | 
| get_params([deep]) | Get parameters for this estimator. | 
| inverse_transform(sequences) | Transform a list of sequences from internal indexing into | 
| sample_discrete([state, n_steps, random_state]) | Generate a random sequence of states by propagating the model using discrete time steps given by the model lagtime. | 
| score(sequences[, y]) | Score the model on new data using the generalized matrix Rayleigh | 
| set_params(**params) | Set the parameters of this estimator. | 
| summarize() | |
| transform(sequences[, mode]) | Transform a list of sequences to internal indexing | 
| uncertainty_K() | Estimate of the element-wise asymptotic standard deviation | 
| uncertainty_eigenvalues() | Estimate of the element-wise asymptotic standard deviation | 
| uncertainty_pi() | Estimate of the element-wise asymptotic standard deviation in the stationary distribution. | 
| uncertainty_timescales() | Estimate of the element-wise asymptotic standard deviation in the model relaxation timescales. | 
Sample conformations for a sequences of states.
| Parameters: | sequences : list or list of lists 
 n_samples : int 
 | 
|---|---|
| Returns: | selected_pairs_by_state : np.array, dtype=int, 
 | 
See also
index.
Fit to data, then transform it.
Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.
| Parameters: | X : numpy array of shape [n_samples, n_features] 
 y : numpy array of shape [n_samples] 
 | 
|---|---|
| Returns: | X_new : numpy array of shape [n_samples, n_features_new] 
 | 
Get parameters for this estimator.
| Parameters: | deep: boolean, optional 
 | 
|---|---|
| Returns: | params : mapping of string to any 
 | 
Transform a list of sequences from internal indexing into labels
| Parameters: | sequences : list 
 | 
|---|---|
| Returns: | sequences : list 
 | 
Generate a random sequence of states by propagating the model using discrete time steps given by the model lagtime.
| Parameters: | state : {None, ndarray, label} 
 n_steps : int 
 random_state : int or RandomState instance or None (default) 
 | 
|---|---|
| Returns: | sequence : array of length n_steps 
 | 
Score the model on new data using the generalized matrix Rayleigh quotient
| Parameters: | sequences : list of array-like 
 | 
|---|---|
| Returns: | gmrq : float 
 | 
References
| [R31] | McGibbon, R. T. and V. S. Pande, “Variational cross-validation of slow dynamical modes in molecular kinetics” J. Chem. Phys. 142, 124105 (2015) | 
Training score of the model, computed as the generalized matrix, Rayleigh quotient, the sum of the first n_components eigenvalues
Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as pipelines). The former have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object.
| Returns: | self | 
|---|
Transform a list of sequences to internal indexing
Recall that sequences can be arbitrary labels, whereas transmat_ and countsmat_ are indexed with integers between 0 and n_states - 1. This methods maps a set of sequences from the labels onto this internal indexing.
| Parameters: | sequences : list of array-like 
 mode : {‘clip’, ‘fill’} 
 | 
|---|---|
| Returns: | mapped_sequences : list 
 | 
Estimate of the element-wise asymptotic standard deviation in the rate matrix
Estimate of the element-wise asymptotic standard deviation in the model eigenvalues
Estimate of the element-wise asymptotic standard deviation in the stationary distribution.
Estimate of the element-wise asymptotic standard deviation in the model relaxation timescales.