function ck_test

deeptime.util.validation.ck_test(models, observable: Observable, test_model=None, include_lag0=True, err_est=False, progress=None)

Performs a Chapman-Kolmogorov test: Under the assumption of Markovian dynamics some transfer operators such as the transition matrix of a Markov state model or a Koopman model possess the so-called Chapman-Kolmogorov property. It states that for lagtimes τ1,τ2\tau_1, \tau_2 the transfer operator behaves like Tτ1+τ2=Tτ1Tτ2\mathcal{T}_{\tau_1 + \tau_2} = \mathcal{T}_{\tau_1}\mathcal{T}_{\tau_2}.

This method performs a test to verify the above identity by evaluating an observable ρ\rho twice on a range of different lagtimes. The observable evaluated on each model (estimated at a different lagtime) is compared against the observable evaluated on the test model when it is propagated by the Chapman-Kolmogorov equation to the corresponding lagtime:

Tkτtestρ=!Tτ~model\mathcal{T}^\mathrm{test}_{k \tau}\rho \overset{!}{=} \mathcal{T}^{\mathrm{model}}_{\tilde{\tau}}

such that kτ=τ~k\tau = \tilde{\tau}.

(Source code, png, hires.png, pdf)

../../_images/plot_ck_test.png
Parameters:
  • models (list of models) – List of models estimated at different lagtimes.

  • observable (Observable) – An observable. The choice mainly depends on what kind of models are compared. Observables are required to be callable with a model instance.

  • test_model (model, optional, default=None) – The test model. Per default this uses the model with the smallest lagtime of the models list.

  • include_lag0 (bool, optional, default=True) – Whether to include τ=0\tau = 0 into the test.

  • err_est (bool, optional, default=False) – Whether to compute the observable on Bayesian samples of the estimated models.

  • progress (ProgressBar, optional, default=None) – An optional progress bar. Tested with tqdm.

Returns:

ck_test – The results. Can be used with plot_ck_test <deeptime.plots.plot_ck_test>.

Return type:

ChapmanKolmogorovTest