function metastable_from_msm

deeptime.markov.hmm.init.discrete.metastable_from_msm(msm, n_hidden_states: int, reversible: bool = True, stationary: bool = False, separate_symbols=None, regularize: bool = True)

Makes an initial guess for an HMM with discrete output model from an already existing MSM over observable states. The procedure is described in [1] and uses PCCA+ [2] for coarse-graining the transition matrix and obtaining membership assignments.

Parameters:
  • msm (MarkovStateModel) – The markov state model over observable state space.

  • n_hidden_states (int) – The desired number of hidden states.

  • reversible (bool, optional, default=True) – Whether the HMM transition matrix is estimated so that it is reversibe.

  • stationary (bool, optional, default=False) – If True, the initial distribution of hidden states is self-consistently computed as the stationary distribution of the transition matrix. If False, it will be estimated from the starting states. Only set this to true if you’re sure that the observation trajectories are initiated from a global equilibrium distribution.

  • separate_symbols (array_like, optional, default=None) – Force the given set of observed states to stay in a separate hidden state. The remaining #(observed states)-1 states will be assigned by a metastable decomposition.

  • regularize (bool, optional, default=True) – If set to True, makes sure that the hidden initial distribution and transition matrix have nonzero probabilities by setting them to eps and then renormalizing. Avoids zeros that would cause estimation algorithms to crash or get stuck in suboptimal states.

Returns:

hmm_init – An initial guess for the HMM

Return type:

HiddenMarkovModel

See also

deeptime.markov.hmm.DiscreteOutputModel

The type of output model this heuristic uses.

metastable_from_data()

Initial guess from data if no MSM is available yet.

deeptime.markov.hmm.init.gaussian.from_data()

Initial guess with Gaussian output model.

References