I’m updating a model in Pymc 4 that follows the same basic structure of the Radon example. In my case, individuals are clusters and measurements are timepoints, i.e., a repeated measures design.
The covariance model (cell 40) runs without any issues; however, when requesting traceplots I get the following warnings:
arviz/stats/density_utils.py:491: UserWarning: Your data appears to have a single value or no finite values
arviz/stats/density_utils.py:706: RuntimeWarning: divide by zero encountered in true_divide f = grid_counts / bin_width / len(x)
arviz/stats/density_utils.py:709: RuntimeWarning: divide by zero encountered in double_scalars
bw /= bin_width
Followed by a traceback that ends with:
File ~/miniconda3/envs/pymc4_env/lib/python3.9/site-packages/arviz/stats/density_utils.py:715, in _kde_convolution(x, bw, grid_edges, grid_counts, grid_len, bound_correction, **kwargs)
711 # See: https://stackoverflow.com/questions/2773606/gaussian-filter-in-matlab
713 grid = (grid_edges[1:] + grid_edges[:-1]) / 2
--> 715 kernel_n = int(bw * 2 * np.pi)
716 if kernel_n == 0:
717 kernel_n = 1
OverflowError: cannot convert float infinity to integer
The kde for the intercept-slope correlation will render but no traceplot is produced for the correlation, or any of the remaining parameters in the model.
I’m wondering if this is an issue with the constants that come out of pm.LKJCholeskyCov()
distribution. I’m using arviz==0.12.0
. I don’t encounter these problems when using pymc3==3.11.1
with arviz==0.11.2