chrism0dwk / covid19uk

MIT License
11 stars 10 forks source link

Convergence diagnostics #5

Closed FrankD closed 4 years ago

FrankD commented 4 years ago

@chrism0dwk, I was thinking of implementing some convergence diagnostics for your MCMC; is this useful? I'm thinking effective sample size and maybe Gelman-Rubin R-hat.

https://arxiv.org/pdf/1909.11827.pdf

chrism0dwk commented 4 years ago

Frank, and ESS implementation would be awesome, thanks! BGR optional, but ESS might be useful in-chain as well as post-hoc.

FrankD commented 4 years ago

Disappointingly (for my coding enjoyment), it turns out that this is already implemented in Tensorflow probability.

I added calculation of the ESS to the end of the mcmc.py script. Pull request #7 (but it's literally one line).