class BayesianMSMPosterior¶
- class deeptime.markov.msm.BayesianMSMPosterior(prior=None, samples=None)¶
Bayesian posterior from bayesian MSM sampling.
- Parameters:
prior (deeptime.markov.msm.MarkovStateModel, optional, default=None) – The prior.
samples (list of deeptime.markov.msm.MarkovStateModel, optional, default=None) – Sampled models.
See also
Attributes
Lagtime of the models.
The prior model.
The sampled models
Methods
ck_test
(models, n_metastable_sets[, ...])Performs a Chapman Kolmogorov test.
copy
()Makes a deep copy of this model.
evaluate_samples
(quantity[, delimiter])Obtains a quantity (like an attribute or result of a method or a property) from each of the samples.
gather_stats
(quantity[, store_samples, ...])Obtain statistics about a sampled quantity.
get_params
([deep])Get the parameters.
set_params
(**params)Set the parameters of this estimator.
submodel
(states)Creates a bayesian posterior that is restricted onto the specified states.
timescales
([k])Relaxation timescales corresponding to the eigenvalues.
- ck_test(models, n_metastable_sets, include_lag0=True, err_est=False, progress=None)¶
Performs a Chapman Kolmogorov test. See
MarkovStateModel.ck_test
for more details
- copy() Model ¶
Makes a deep copy of this model.
- Returns:
A new copy of this model.
- Return type:
copy
- evaluate_samples(quantity, delimiter='/', *args, **kwargs)¶
Obtains a quantity (like an attribute or result of a method or a property) from each of the samples. Returns as list.
- Parameters:
quantity (str) – The quantity. Can be also deeper in the instance hierarchy, indicated by the delimiter.
delimiter (str, default='/') – The delimiter.
*args – Arguments passed to the evaluation point of the quantity.
**kwargs – Keyword arguments passed to the evaluation point of the quantity.
- Returns:
result – A list of the quantity evaluated on each of the samples. If can be converted to float ndarray then ndarray.
- Return type:
list of any or ndarray
- gather_stats(quantity, store_samples=False, delimiter='/', confidence=0.95, *args, **kwargs)¶
Obtain statistics about a sampled quantity. Can also be a chained call, separated by the delimiter.
- Parameters:
quantity (str) – name of attribute, which will be evaluated on samples
store_samples (bool, optional, default=False) – whether to store the samples (array).
delimiter (str, optional, default='/') – separator to call members of members
confidence (float, optional, default=0.95) – Size of the confidence intervals.
*args – pass-through
**kwargs – pass-through
- Returns:
statistics – The statistics
- Return type:
- 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
- submodel(states: ndarray)¶
Creates a bayesian posterior that is restricted onto the specified states.
- Parameters:
states ((N,) ndarray, dtype=int) – array of integers specifying the states to restrict to
- Returns:
submodel – A posterior with prior and samples restricted to specified states.
- Return type:
- timescales(k=None)¶
Relaxation timescales corresponding to the eigenvalues.
- Parameters:
k (int, optional, default=None) – The number of timescales (excluding the stationary process).
- Returns:
timescales – Timescales of the prior and timescales of the samples.
- Return type:
tuple(iterable, iterable)
- property lagtime¶
Lagtime of the models.
- property prior¶
The prior model.
- Returns:
prior – the prior
- Return type:
- property samples¶
The sampled models
- Returns:
models – samples
- Return type:
list of deeptime.markov.msm.MarkovStateModel or None