PyMC3 Half Cauchy Small Beta Values Lead to Errors

Whenever I choose values for beta in pm.HalfCauchy smaller than 0.1 (e.g. tau = pm.HalfCauchy(name="tau", beta=0.01))
I get the following error:

ValueError: Mass matrix contains zeros on the diagonal.
The derivative of RV C.ravel()[0] is zero.

If I increase the value to > 0.1 the same model works, however.
How can I work around this issue?

1 Like

See this discussion and see if that helps at all. When dealing with small parameter values I prefer the “adapt_diag” initialization.