pymc3 - how to add HDI to traceplot?

1.4k Views Asked by At

Is there a build-in way to add Highest Density Interval to traceplot in pymc3?

I would like to display the HDI on my traceplot directly, ideally with labels. Basically, I would like to produce a posterior distribution plot, similar to those in "Doing Bayesian Data Analysis" book: enter image description here

I don't want to re-invent something that might be implemented in pymc3 already.

1

There are 1 best solutions below

2
On BEST ANSWER

Not built-in way but you can check the code here. Specially plot_post

Update

A function (plot_posterior) to make this plot has been added to PyMC3.