I conducted a Bayesian mean difference test and obtained the posterior plot of the parameter estimation. I adjusted the HDI probability to 0.995; however, the plot_posterior function of Arviz rounds the probability value to 100% when displaying on the plot, as seen in the following figure. I need that plot to display 99.5%, which is the exact value of credible interval. Although the "round_to" argument allows controlling the formatting of floats, it didn't adjust the HDI percentage.
Asked
Active
Viewed 513 times
1

Serdar
- 35
- 3
-
1I think it is not possible because the rounding is hard-coded within the function that generates the plot. See 'format_as_percent(hdi_prob)' https://github.com/arviz-devs/arviz/blob/8bd1de30cbea184c1493f3272fdca8ec1e6bcc8e/arviz/plots/backends/matplotlib/posteriorplot.py#L290-L296. By default it rounds to 0 decimal places and it seems you can't override that from the `az.plot_posterior()` call. – Tomas Capretto May 10 '21 at 14:59
-
1I think we should allow this, can you open an issue at https://github.com/arviz-devs/arviz/issues? – OriolAbril May 15 '21 at 09:48