pyemma.msm.HMSM¶
-
class
pyemma.msm.
HMSM
(*args, **kwargs)¶ Hidden Markov model on discrete states.
- Parameters
hmm (
DiscreteHMM
) – Hidden Markov Model
-
__init__
(P, pobs, pi=None, dt_model='1 step')¶ - Parameters
Pcoarse (ndarray (m,m)) – coarse-grained or hidden transition matrix
Pobs (ndarray (m,n)) – observation probability matrix from hidden to observable discrete states
dt_model (str, optional, default='1 step') – time step of the model
Methods
_SerializableMixIn__interpolate
(state, klass)__delattr__
(name, /)Implement delattr(self, name).
__dir__
()Default dir() implementation.
__eq__
(other)Return self==value.
__format__
(format_spec, /)Default object formatter.
__ge__
(value, /)Return self>=value.
__getattribute__
(name, /)Return getattr(self, name).
__getstate__
()__gt__
(value, /)Return self>value.
__init__
(P, pobs[, pi, dt_model])- param Pcoarse
coarse-grained or hidden transition matrix
__init_subclass__
(*args, **kwargs)This method is called when a class is subclassed.
__le__
(value, /)Return self<=value.
__lt__
(value, /)Return self<value.
__my_getstate__
()__my_setstate__
(state)__ne__
(value, /)Return self!=value.
__new__
(cls, *args, **kwargs)Create and return a new object.
__reduce__
()Helper for pickle.
__reduce_ex__
(protocol, /)Helper for pickle.
__repr__
()Return repr(self).
__setattr__
(name, value, /)Implement setattr(self, name, value).
__setstate__
(state)__sizeof__
()Size of object in memory, in bytes.
__str__
()Return str(self).
__subclasshook__
Abstract classes can override this to customize issubclass().
_assert_in_active
(A)Checks if set A is within the active set
_assert_metastable
()Tests if pcca object is available, or else raises a ValueError.
_committor_backward
(P, A, B[, mu])_committor_forward
(P, A, B)_compute_eigendecomposition
(neig)Conducts the eigenvalue decomposition and stores k eigenvalues, left and right eigenvectors
_compute_eigenvalues
(neig)Conducts the eigenvalue decomposition and stores k eigenvalues, left and right eigenvectors
_ensure_eigendecomposition
([neig])Ensures that eigendecomposition has been performed with at least neig eigenpairs
_ensure_eigenvalues
([neig])Ensures that at least neig eigenvalues have been computed
_get_classes_to_inspect
()gets classes self derives from which 1.
_get_interpolation_map
(cls)_get_model_param_names
()Get parameter names for the model
_get_private_field
(cls, name[, default])_get_serialize_fields
(cls)_get_state_of_serializeable_fields
(klass, state):return a dictionary {k:v} for k in self.serialize_fields and v=getattr(self, k)
_get_version
(cls[, require])_get_version_for_class_from_state
(state, klass)retrieves the version of the current klass from the state mapping from old locations to new ones.
_mfpt
(P, A, B[, mu])_set_state_from_serializeable_fields_and_state
(…)set only fields from state, which are present in klass.__serialize_fields
committor_backward
(A, B)Backward committor from set A to set B
committor_forward
(A, B)Forward committor (also known as p_fold or splitting probability) from set A to set B
correlation
(a[, b, maxtime, k, ncv])Time-correlation for equilibrium experiment.
eigenvalues
([k])Compute the transition matrix eigenvalues
eigenvectors_left
([k])Compute the left transition matrix eigenvectors
eigenvectors_right
([k])Compute the right transition matrix eigenvectors
expectation
(a)Equilibrium expectation value of a given observable.
fingerprint_correlation
(a[, b, k, ncv])Dynamical fingerprint for equilibrium time-correlation experiment.
fingerprint_relaxation
(p0, a[, k, ncv])Dynamical fingerprint for perturbation/relaxation experiment.
get_model_params
([deep])Get parameters for this model.
load
(file_name[, model_name])Loads a previously saved PyEMMA object from disk.
mfpt
(A, B)Mean first passage times from set A to set B, in units of the input trajectory time step
pcca
(m)Runs PCCA++ [1]_ to compute a metastable decomposition of MSM states
propagate
(p0, k)Propagates the initial distribution p0 k times
relaxation
(p0, a[, maxtime, k, ncv])Simulates a perturbation-relaxation experiment.
save
(file_name[, model_name, overwrite, …])saves the current state of this object to given file and name.
set_model_params
([P, pobs, pi, reversible, …])- param P
coarse-grained or hidden transition matrix
simulate
(N[, start, stop, dt])Generates a realization of the Hidden Markov Model
submodel
([states, obs])Returns a HMM with restricted state space
timescales
([k])The relaxation timescales corresponding to the eigenvalues
transition_matrix_obs
([k])Computes the transition matrix between observed states
update_model_params
(**params)Update given model parameter if they are set to specific values
Attributes
P
The transition matrix on the active set.
_HMSM__serialize_version
_MSM__serialize_fields
_MSM__serialize_version
_SerializableMixIn__serialize_fields
_SerializableMixIn__serialize_modifications_map
_SerializableMixIn__serialize_version
__dict__
__doc__
__hash__
__module__
__weakref__
list of weak references to the object (if defined)
_save_data_producer
dt_model
Description of the physical time corresponding to the lag.
eigenvectors_left_obs
eigenvectors_right_obs
is_reversible
Returns whether the MSM is reversible
is_sparse
Returns whether the MSM is sparse
lifetimes
Lifetimes of states of the hidden transition matrix
metastable_assignments
Computes the assignment to metastable sets for observable states
metastable_distributions
Returns the output probability distributions. Identical to
metastable_memberships
Computes the memberships of observable states to metastable sets by
metastable_sets
Computes the metastable sets of observable states within each
n_metastable
Number of states chosen for PCCA++ computation.
neig
number of eigenvalues to compute.
nstates
Number of active states on which all computations and estimations are done
nstates_obs
observation_probabilities
returns the output probability matrix
pi
The stationary distribution on the MSM states
reversible
Returns whether the MSM is reversible
sparse
Returns whether the MSM is sparse
stationary_distribution
The stationary distribution on the MSM states
stationary_distribution_obs
timestep_model
Physical time corresponding to one transition matrix step, e.g.
transition_matrix
The transition matrix on the active set.