pyemma.msm.SampledMSM¶
-
class
pyemma.msm.SampledMSM(*args, **kwargs)¶ Sampled Markov state model
-
__init__(P, pi=None, reversible=None, dt_model='1 step', neig=None, ncv=None)¶ Markov model with a given transition matrix
- Parameters
P (ndarray(n,n)) – transition matrix
pi (ndarray(n), optional, default=None) – stationary distribution. Can be optionally given in case if it was already computed, e.g. by the estimator.
reversible (bool, optional, default=None) – whether P is reversible with respect to its stationary distribution. If None (default), will be determined from P
dt_model (str, optional, default='1 step') –
Description of the physical time corresponding to one time step of the MSM (aka lag time). May be used by analysis algorithms such as plotting tools to pretty-print the axes. By default ‘1 step’, i.e. there is no physical time unit. Specify by a number, whitespace and unit. Permitted units are (* is an arbitrary string):
’fs’, ‘femtosecond*’
’ps’, ‘picosecond*’
’ns’, ‘nanosecond*’
’us’, ‘microsecond*’
’ms’, ‘millisecond*’
’s’, ‘second*’
neig (int or None) – The number of eigenvalues / eigenvectors to be kept. If set to None, defaults will be used. For a dense MSM the default is all eigenvalues. For a sparse MSM the default is 10.
ncv (int (optional)) – Relevant for eigenvalue decomposition of reversible transition matrices. ncv is the number of Lanczos vectors generated, ncv must be greater than k; it is recommended that ncv > 2*k.
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[, pi, reversible, dt_model, …])Markov model with a given 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.
_check_samples_available()_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.
sample_conf(f, *args, **kwargs)Sample confidence interval of numerical method f over all samples
sample_f(f, *args, **kwargs)Evaluated method f for all samples
sample_mean(f, *args, **kwargs)Sample mean of numerical method f over all samples
sample_std(f, *args, **kwargs)Sample standard deviation of numerical method f over all samples
save(file_name[, model_name, overwrite, …])saves the current state of this object to given file and name.
set_model_params([samples, conf, P, pi, …])- param samples
sampled MSMs
simulate(N[, start, stop, dt])Generates a realization of the Markov Model
timescales([k])The relaxation timescales corresponding to the eigenvalues
update_model_params(**params)Update given model parameter if they are set to specific values
Attributes
PThe transition matrix on the active set.
_MSM__serialize_fields_MSM__serialize_version_SampledMSM__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_producerdt_modelDescription of the physical time corresponding to the lag.
is_reversibleReturns whether the MSM is reversible
is_sparseReturns whether the MSM is sparse
metastable_assignmentsAssignment of states to metastable sets using PCCA++
metastable_distributionsProbability of metastable states to visit an MSM state by PCCA++
metastable_membershipsProbabilities of MSM states to belong to a metastable state by PCCA++
metastable_setsMetastable sets using PCCA++
n_metastableNumber of states chosen for PCCA++ computation.
neignumber of eigenvalues to compute.
nstatesNumber of active states on which all computations and estimations are done
piThe stationary distribution on the MSM states
reversibleReturns whether the MSM is reversible
samplessparseReturns whether the MSM is sparse
stationary_distributionThe stationary distribution on the MSM states
timestep_modelPhysical time corresponding to one transition matrix step, e.g.
transition_matrixThe transition matrix on the active set.
-