msmbuilder.hmm.
GaussianHMM
¶Reversible Gaussian Hidden Markov Model L1-Fusion Regularization
This model estimates Hidden Markov model for a vector dataset which is
contained to be reversible (satisfy detailed balance) with Gaussian
emission distributions. This model is similar to a MarkovStateModel
without a “hard” assignments of conformations to clusters. Optionally, it
can apply L1-regularization to the positions of the Gaussians. See [1] for
details.
Parameters: |
|
---|
References
[1] | McGibbon, Robert T. et al., “Understanding Protein Dynamics with L1-Regularized Reversible Hidden Markov Models” Proc. 31st Intl. Conf. on Machine Learning (ICML). 2014. |
means_
¶vars_
¶transmat_
¶populations_
¶fit_logprob_
¶__init__
()¶Initialize self. See help(type(self)) for accurate signature.
Methods
draw_centroids |
Find conformations most representative of model means. |
draw_samples |
Sample conformations from each state. |
fit |
Estimate model parameters. |
predict |
Find most likely hidden-state sequence corresponding to each data timeseries. |
score |
Log-likelihood of sequences under the model |
summarize |
Get a string summarizing the model. |
Attributes
fit_logprob_ |
|
means_ |
|
populations_ |
|
timescales_ |
The implied relaxation timescales of the hidden Markov transition |
transmat_ |
|
vars_ |
draw_centroids
()¶Find conformations most representative of model means.
Parameters: | sequences (list) – List of 2-dimensional array observation sequences, each of which has shape (n_samples_i, n_features), where n_samples_i is the length of the i_th observation. |
---|---|
Returns: |
|
See also
utils.map_drawn_samples()
GaussianHMM.draw_samples()
draw_samples
()¶Sample conformations from each state.
Parameters: |
|
---|---|
Returns: |
|
Notes
With scheme=’even’, this function assigns frames to states crisply then samples from the uniform distribution on the frames belonging to each state. With scheme=’maxent’, this scheme uses a maximum entropy method to determine a discrete distribution on samples whose mean (and possibly variance) matches the GHMM means.
See also
utils.map_drawn_samples()
GaussianHMM.draw_centroids()
fit
()¶Estimate model parameters.
Parameters: | sequences (list) – List of 2-dimensional array observation sequences, each of which has shape (n_samples_i, n_features), where n_samples_i is the length of the i_th observation. |
---|
predict
()¶Find most likely hidden-state sequence corresponding to each data timeseries.
Uses the Viterbi algorithm.
Parameters: | sequences (list) – List of 2-dimensional array observation sequences, each of which has shape (n_samples_i, n_features), where n_samples_i is the length of the i_th observation. |
---|---|
Returns: |
|
score
()¶Log-likelihood of sequences under the model
Parameters: | sequences (list) – List of 2-dimensional array observation sequences, each of which has shape (n_samples_i, n_features), where n_samples_i is the length of the i_th observation. |
---|
summarize
()¶Get a string summarizing the model.
timescales_
¶The implied relaxation timescales of the hidden Markov transition matrix
By diagonalizing the transition matrix, its propagation of an arbitrary initial probability vector can be written as a sum of the eigenvectors of the transition weighted by per-eigenvector term that decays exponentially with time. Each of these eigenvectors describes a “dynamical mode” of the transition matrix and has a characteristic timescale, which gives the timescale on which that mode decays towards equilibrium. These timescales are given by \(-1/log(u_i)\) where \(u_i\) are the eigenvalues of the transition matrix. In a reversible HMM with N states, the number of timescales is at most N-1. (The -1 comes from the fact that the stationary distribution of the chain is associated with an eigenvalue of 1, and an infinite characteristic timescale). The number of timescales can be less than N-1 for every eigenvalue of the transition matrix that is negative (which is allowable by detailed balance).
Returns: | timescales – The characteristic timescales of the transition matrix. If the model has not been fit or does not have a transition matrix, the return value will be None. |
---|---|
Return type: | array, shape=[n_timescales] |