Open
Description
This is just a small thing about the last cell of BCM/ParameterEstimation/Binomial.ipynb
added as a part of Note from Junpeng Lao.
The length of divergent
below was 4000 when I printed its size, which corresponded to 1000 samples of 4 traces. So I guess divperc
should have been 357/4000 = 9.125% instead of 35.7%.
# display the total number and percentage of divergences
divergent = trace6_["diverging"]
print("Number of divergences: %d" % divergent.nonzero()[0].size)
divperc = divergent.nonzero()[0].size * 100 / len(trace6_)
print("Percentage of divergent samples: %.2f" % divperc)
# scatter plot between theta and N
# for the identifcation of the problematic neighborhoods in parameter space
theta_tr = trace6_["theta"]
totaln_tr = trace6_["TotalN"]
plt.figure(figsize=(6, 6))
plt.scatter(totaln_tr[divergent == 0], theta_tr[divergent == 0], color="r", alpha=0.05)
plt.scatter(totaln_tr[divergent == 1], theta_tr[divergent == 1], color="g", alpha=0.5);
Many thanks for sharing the pymc3 codes.
Metadata
Metadata
Assignees
Labels
No labels