项目作者: Gabriel-p

项目描述 :
Multivariate effective sample size (mESS) of Markov chain in Python
高级语言: Python
项目地址: git://github.com/Gabriel-p/multiESS.git
创建时间: 2018-06-22T19:54:15Z
项目社区:https://github.com/Gabriel-p/multiESS

开源协议:GNU General Public License v3.0

下载


multiESS

Compute the multivariate effective sample size (mESS) of a Markov chain,
using the multivariate dependence structure of the process.

This is a Python implementation of the MATLAB implementation by Luigi
Acerbi of the mESS estimation method described in Vats et al. (2015).
The MATLAB code (and consequently this one) has some minor tweaks for the
choice of batch size b for the computation of the Monte Carlo covariance
matrix.

See the R package mcmcse for a separate implementation.

Disclaimer: This is a stripped down version of the original MATLAB code.
Most notably it does neither accept nor return the Monte Carlo covariance
matrix and does not return the batch size. It also processes one chain at a
time.

Details

The effective sample size of a Markov chain is the size of an i.i.d. sample
with the same covariance structure as the current chain.

mESS is given by

  1. mESS = n |Λ|^{1/p}/ |Σ|^{1/p}

where n is the current sample size, Λ is the sample covariance matrix,
p is the number of parameters and Σ is an estimate of the Monte Carlo
covariance matrix for the Markov chain (here obtained by batch estimation).

Reference

Vats, D., Flegal, J. M., & Jones, G. L. “Multivariate Output Analysis for
Markov chain Monte Carlo”, arXiv preprint arXiv:1512.07713 (2015)