Thanks for the suggestions. I was trying to run your model and it took me 20 mins to run. I am not sure why the sampler would be slow. I tried using ADVI
with mod:
inference = pm.ADVI()
tracker = pm.callbacks.Tracker(
mean= inference.approx.mean.eval, # callable that returns mean
std= inference.approx.std.eval # callable that returns std
)
apprx = pm.fit(1000, method='advi', obj_n_mc=5,
obj_optimizer=pm.adagrad(learning_rate=1.), callbacks=[tracker])
idata = approx.sample(5000)
The loss was decreasing at an exceptionally slow rate or was constant for more than 10 mins. I would expect ADVI to run fast and at least have a solution. Do you why the analysis is slow? I am using a 16-CPU machine using parallelism.