MCMC Summary¶
- class pints.MCMCSummary(chains, time=None, parameter_names=None)[source]¶
Calculates and prints key summaries of posterior samples and diagnostic quantities from MCMC chains.
These include the posterior mean, standard deviation, quantiles, rhat, effective sample size and (if running time is supplied) effective samples per second.
- Parameters:
chains – An array or list of chains returned by an MCMC sampler.
time (float) – The time taken for the run, in seconds (optional).
parameter_names (sequence) – A list of parameter names (optional).
References
- ess_per_second()[source]¶
Return the effective sample size (as defined in [2]) per second of run time for each parameter.
This is only defined if a run time was passed in at construction time, if no run time is known
None
is returned.
- rhat()[source]¶
Return Gelman and Rubin’s rhat value as defined in [1]. If a single chain is used, the chain is split into two halves and rhat is calculated using these two parts.