Hi all,
I am running a Hierarchical Model defined as:
where the objective is to estimate, from multinomial counts (k classes) in b samples (stratified in g groups), the posterior distribution of \alpha_g, where each \alpha_g is a vector of size k of independent \Gamma random variables.
The main goal is to estimate and compare the latent \alpha_g posterior distribution between different groups (g groups), for each one of the k classes.
During instantiation of the model and sampling, I receive the following warning:
/Users/user/.pyenv/versions/3.7.4/lib/python3.7/site-packages/pymc3/distributions/transforms.py:461: RuntimeWarning: divide by zero encountered in log
lx = np.log(x)
/Users/user/.pyenv/versions/3.7.4/lib/python3.7/site-packages/pymc3/distributions/transforms.py:463: RuntimeWarning: invalid value encountered in subtract
y = lx[:-1] - shift
I am aware that the Gamma distributions in the model are transformed automatically using a log transformation, i.e. when printing the model I can see the following:
Also, the Gamma has support > 0, so I suppose that this is related to the warning, e.g., the log transformation of some Gamma random variables might be trying to take the log of 0 (probably related issue Error with lambda expression · Issue #303 · pymc-devs/pymc3 · GitHub).
However, I cannot understand if this warning affects the inference and/or how to take care of it. Any help on how to approach this problem would be greatly appreciated, thanks!