class PCCAModel

class deeptime.markov.PCCAModel(transition_matrix_coarse: ndarray, pi_coarse: ndarray, memberships: ndarray, metastable_distributions: ndarray)

Model for PCCA+ spectral clustering method with optimized memberships.

PCCA+ spectral clustering is described in [1]. Clusters the first m eigenvectors of a transition matrix in order to cluster the states. This function does not assume that the transition matrix is fully connected. Disconnected sets will automatically define the first metastable states, with perfect membership assignments.

Parameters:
  • transition_matrix_coarse (ndarray (n,n)) – Coarse transition matrix.

  • pi_coarse (ndarray (n,)) – Coarse stationary distribution

  • memberships (ndarray (n,m)) – The pcca memberships to clusters

  • metastable_distributions (ndarray (m, n)) – metastable distributions

See also

pcca

Method that produces this type of model.

msm.MarkovStateModel.pcca

Coarse-grain with PCCA+ from already existing MSM instance.

References

Attributes

assignments

Assignment of states to metastable sets using PCCA++

coarse_grained_stationary_probability

Stationary distribution for coarse_grained_transition_matrix.

coarse_grained_transition_matrix

Coarse grained transition matrix with n_metastable states.

memberships

Probabilities of MarkovStateModel states to belong to a metastable state by PCCA+

metastable_distributions

Probability of metastable states to visit an MarkovStateModel state by PCCA+

n_metastable

Number of metastable states.

sets

Metastable sets using PCCA+

Methods

copy()

Makes a deep copy of this model.

get_params([deep])

Get the parameters.

set_params(**params)

Set the parameters of this estimator.

copy() Model

Makes a deep copy of this model.

Returns:

A new copy of this model.

Return type:

copy

get_params(deep=False)

Get the parameters.

Returns:

params – Parameter names mapped to their values.

Return type:

mapping of string to any

set_params(**params)

Set the parameters of this estimator.

The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object.

Parameters:

**params (dict) – Estimator parameters.

Returns:

self – Estimator instance.

Return type:

object

property assignments: ndarray

Assignment of states to metastable sets using PCCA++

Computes the assignment to metastable sets for active set states using the PCCA++ method [1].

This is only recommended for visualization purposes. You cannot compute any actual quantity of the coarse-grained kinetics without employing the fuzzy memberships!

Returns:

assignments – For each MarkovStateModel state, the metastable state it is located in.

Return type:

ndarray (n,)

property coarse_grained_stationary_probability

Stationary distribution for coarse_grained_transition_matrix.

property coarse_grained_transition_matrix

Coarse grained transition matrix with n_metastable states.

property memberships

Probabilities of MarkovStateModel states to belong to a metastable state by PCCA+

Returns the memberships of active set states to metastable sets.

Returns:

M – A matrix containing the probability or membership of each state to be assigned to each metastable set, i.e. p(metastable | state). The row sums of M are 1.

Return type:

ndarray((n,m))

property metastable_distributions

Probability of metastable states to visit an MarkovStateModel state by PCCA+

Returns the probability distributions of active set states within each metastable set by combining the PCCA+ method with Bayesian inversion as described in [2].

Returns:

p_out – A matrix containing the probability distribution of each active set state, given that we are in one of the m metastable sets, i.e. p(state | metastable). The row sums of p_out are 1.

Return type:

ndarray (m,n)

property n_metastable

Number of metastable states.

property sets: List[ndarray]

Metastable sets using PCCA+

Computes the metastable sets of active set states within each metastable set using the PCCA+ method [1].

This is only recommended for visualization purposes. You cannot compute any actual quantity of the coarse-grained kinetics without employing the fuzzy memberships!

Returns:

sets – A list of length equal to metastable states. Each element is an array with microstate indexes contained in it

Return type:

list of ndarray