deeptime-ml / deeptime

Python library for analysis of time series data including dimensionality reduction, clustering, and Markov model estimation
https://deeptime-ml.github.io/
GNU Lesser General Public License v3.0
754 stars 84 forks source link

Bayesian Markov models give different MFPT #278

Closed ShenWenHuibit closed 1 year ago

ShenWenHuibit commented 1 year ago
from deeptime.markov import TransitionCountEstimator
from deeptime.markov.msm import BayesianMSM
counts_estimator = TransitionCountEstimator(lagtime=LAGtime, count_mode='effective')
counts = counts_estimator.fit_fetch(dtrajs).submodel_largest()
b_msm_estimator = BayesianMSM()
b_msm = b_msm_estimator.fit_fetch(counts)

from deeptime.markov import pcca
nstates = 4
Bayesian_pcca = pcca(b_msm.prior.transition_matrix, nstates)

print(b_msm.prior.mfpt(Bayesian_pcca.sets[0],Bayesian_pcca.sets[1]))
>>283.0460513163462
print(b_msm.evaluate_samples('mfpt',A=[0],B=[1]).mean())
>>768.3398675145543

Please help me to see what is wrong thanks.