models.mcmc_diagnostics()
MCMC diagnostics of chains of draws (Vehtari et al. 2021, as R’s
Usage
models.mcmc_diagnostics(chains)posterior): rank-normalized split R-hat, bulk and tail effective sample sizes, the effective sample size of the mean and its Monte Carlo standard error.
Parameters
chains: list of list of float- Equal-length chains, at least 4 draws each.
Returns
dict-
rhat,ess_bulk,ess_tail,ess_mean,mcse_mean.
Examples
>>> from prospicio.models import mcmc_diagnostics
>>> a = [float((i * 37) % 101) for i in range(400)]
>>> b = [float((i * 53 + 7) % 101) for i in range(400)]
>>> mcmc_diagnostics([a, b])["rhat"] < 1.01True