MCMCResult

MCMCResult(chain: MarkovChain)

An object containing a constructed Markov chain.

Attributes

xs : Tensor

An \(n \times k\) matrix containing the samples that form the Markov chain.

potentials : Tensor

An \(n\)-dimensional vector containing the potential function associated with the target density evaluated at each sample in the chain.

acceptance_rate : float

The acceptance rate of the sampler.

iacts : Tensor

A \(k\)-dimensional vector containing estimates of the integrated autocorrelation time (IACT) for each parameter.

ess : Tensor

A \(k\)-dimensional vector containing estimates of the effective sample size (ESS) of each parameter.

Notes

The IACT for a given parameter is estimated according to \[ \hat{\tau}(M) = 1 + 2 \sum_{i=1}^{M} \hat{\rho}(i), \] where \(\hat{\rho}(i)\) denotes an estimate of the normalised autocorrelation function of the parameter for a lag of \(i\), \(M\) is the smallest integer such that \(M \geq C\hat{\tau}(M)\), and \(C=5\). For further information, see the emcee docs.

The ESS for a given parameter is estimated according to \[ N_{\mathrm{eff}} = \frac{1}{\hat{\tau}(M)}. \]