Open null-a opened 9 years ago
I have a branch where I've been playing with adding callbacks/hooks to MCMC
. At the moment you pass an object something like the following to MCMC
:
{
init: function() {},
iteration: function(trace) {},
finish: function() {}
}
The functions get called when you would expect. It should be pretty easy to implement #257 with this.
My current thinking is that these callbacks will be written in js
rather than wppl
as hooking these into inference if they are in CPS appears a bit fiddly.
Another thought is that it might be useful to see if we can make this general enough to allow us to have generic progress indicators (implemented as callbacks) which work across all inference algorithms.
This was originally raised as part of #64.
These hooks might also be used to implement the
--verbose
option ofMCMC
. (Coming in #169.)