Skip to content

implement multi-ensemble r-hat diagnostic #141

@JohannesBuchner

Description

@JohannesBuchner

The "Introduction to Walks" page makes some visualisations, but this is a quite uninformative diagnostic, which can miss convergence problems.

An example is that emcee can get stuck, and looks converged. But if you ran it multiple times from different starting points, it would get stuck in different places - and you can recognize this.

A standard diagnostic is r-hat. r-hat compares intra-chain variance against across-chain variance for a given statistic (such as one parameter).

Straight-forward application to the walkers is however tricky. If chains talk to each other, because they are an ensemble of walkers, you don't actually have these available to test. You would need a independent chain, i.e., multiple ensembles, to check intra vs cross variances.

Using multiple ensembles can solves this, as explained in this tutorial:
https://johannesbuchner.github.io/autoemcee/mcmc-ensemble-convergence.html

To improve best-practice in astro, it might be worthwhile to implement this in chainconsumer and show as a tutorial how to ingest the chains from 4 emcee chains, and compute the r-hat diagnostic (and the geweke drift).

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions