Closed
Description
Describe the issue:
A simple HurdleGamma
experiences a very high number of divergences, even when priors are tightly centered around true values and the data generating process is correct.
Some chains get "stuck" -- they do not move from their initialized values.
For more, please see this thread in the PyMC community forums
Reproduceable code example:
x = df.x.values
y = df.y.values
with pm.Model() as model:
X = pm.Data("X", df.x.values, dims="ix")
Y = pm.Data("Y", y)
b0 = pm.Normal("b0", 0, 1)
b1 = pm.Normal("b1", 0, 1)
eta = b0 + b1 * X
mu = pm.math.exp(eta)
sigma = pm.Exponential("sigma", 1)
psi = pm.Uniform('psi', 0, 1)
Yobs = pm.HurdleGamma('Yobs', mu=mu, sigma=sigma, observed=y, psi=psi)
with model:
idata = pm.sample()
idata.extend(pm.sample_posterior_predictive(idata))
Error message:
No response
PyMC version information:
5.19.1
Context for the issue:
No response