Chain 1 failed due to Mass matrix contains zeros on the diagonal

Welcome!

How far into sampling did you get before this error occurred? If it occurred before the first sample, you might try:

trace = pm.sample(init='adapt_diag',
                  return_inferencedata=True,
                  tune=3000)

The jittering in default initialization (‘jitter+adapt_diag’) can throw errors when dealing with very small values (e.g., lam=0.0001).

1 Like