Skip to content

Commit 6644cb4

Browse files
authored
axvline in plot_dependence (#70)
1 parent 7a23ead commit 6644cb4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pymc_bart/utils.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,12 @@ def plot_convergence(idata, var_name=None, kind="ecdf", figsize=None, ax=None):
9292

9393
for idx, (essi, rhati) in enumerate(zip(ess, rhat)):
9494
kind_func(essi, ax=ax[0], plot_kwargs={"color": f"C{idx}"})
95-
ax[0].axvline(ess_threshold, color="0.7", ls="--")
9695
kind_func(rhati, ax=ax[1], plot_kwargs={"color": f"C{idx}"})
97-
# Assume Rhats are N(1, 0.005) iid. Then compute the 0.99 quantile
98-
# scaled by the sample size and use it as a threshold.
99-
ax[1].axvline(norm(1, 0.005).ppf(0.99 ** (1 / ess.size)), color="0.7", ls="--")
96+
97+
ax[0].axvline(ess_threshold, color="0.7", ls="--")
98+
# Assume Rhats are N(1, 0.005) iid. Then compute the 0.99 quantile
99+
# scaled by the sample size and use it as a threshold.
100+
ax[1].axvline(norm(1, 0.005).ppf(0.99 ** (1 / ess.size)), color="0.7", ls="--")
100101

101102
ax[0].set_xlabel("ESS")
102103
ax[1].set_xlabel("R-hat")

0 commit comments

Comments
 (0)