I went through the Quickstart notebook in detail and tried things out before writing on discourse. Consider the following line:
with model:
mean_field = pm.fit(method="advi", callbacks=[CheckParametersConvergence()])
plt.plot(mean_field.hist);
I tried this (with pymc 4). I would like to do the following: update an array with my own diagnostics at a specified frequency. So the question is how to retrieve my array from the callback? I guess I must create my own callback? I might experiment with that.
It would be nice to check results every n iterations? Is that done by running pm.sample at a lower frequency, and simply restarting the simulation ?I have not tried this yet. Thanks!
I created my own class, copying CheckParametersConvergence. I was able to get the results allowed. I will now experiment with Tracker.