Ok, you interested me, and I got the notebook running again, but youâll have to trust me on the results. I ran this on colab, using pymc 4.0.1. Colab means that the sampling was done sequentially, and
Timing
This is the median, as reported by pymc:
- Metropolis: 1:02 / chain
- NUTS: 1:02 / chain
ESS
Cast to int for readability, and note that we use an updated ESS calculation, so it can be greater than 40k here.
{'pooled_rate': array(1389),
'state_rate': array([3586, 1681, 1761, 659, 1673, 2489, 3077, 4167, 890, 1029, 3397,
2259, 1145, 1633, 2183, 1945, 1591, 1371, 2564, 1779, 2071, 1168,
1571, 1514, 1194, 2385, 2533, 2251, 3503, 1544, 1843, 955, 1252,
3506, 1097, 1731, 1945, 992, 3119, 1115, 2939, 1133, 792, 2446,
4205, 1501, 1647, 1992, 1449, 3325])}
{'pooled_rate': array(79228),
'state_rate': array([104168, 101727, 105899, 105546, 97935, 106397, 97709, 98964,
92776, 101145, 101708, 89374, 101525, 97536, 99377, 99805,
100772, 97263, 90646, 94253, 103632, 104125, 99385, 99157,
99894, 100388, 98847, 101918, 96794, 100890, 92974, 104452,
94207, 96887, 104427, 104683, 89838, 104355, 98145, 104004,
103054, 94856, 95218, 104233, 97423, 103515, 98367, 97032,
102729, 105320])}
As a side note, Metropolis sampling emits this warning:
/usr/local/lib/python3.7/dist-packages/pymc/step_methods/metropolis.py:289: RuntimeWarning: overflow encountered in exp
"accept": np.mean(np.exp(self.accept_rate_iter)),