Percentile and Mean of certain parameter

Hi everyone!

I’m new at PyMC and I wonder what is the way to get distribution of certain parameter of my model?

I can get its plot via pm.plot_trace(trace, var_names='theta'), but I also need the 95% percentile and mean of it.

Arviz is the companion package to pymc that handles these sorts of analysis-of-posterior jobs.

You could try az.summary for a tabular description of the mean, variance, and HDI of your posterior, or az.plot_posterior to see the actual plot with the mean and HDI labeled automatically.

1 Like