You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like to "make a movie" of how the iterations arrive to the solution.
We can run of course many times the program. But we actually we need to
access are res.sample and res.weights (or something similar) during run time.
The text was updated successfully, but these errors were encountered:
I've done similar things for testing, via the callback keyword argument, which is a function that is evaluated on every iteration. This isn't fully documented, but the callback is currently passed a dictionary, containing keys:
'it': running iteration number
'logz': running evidence sum
'active_u': active points in unit cube (2-d array)
'sampler': The underlying Sampler object, through which you can access things like active bounding ellipsoids at each iteration (if you happen to know the internals of the sampler)
I have a notebook that uses the callback to animate active points and bounding ellipsoids at each iteration for the eggbox problem. I could try to clean that up and post it somewhere. But basically, it does something like this:
defmy_callback(info):
# do something with info['active_u'] and info['sampler'].ells, perhaps updating a matplotlib figure
...
result=nestle.sample(..., callback=my_callback)
We would like to "make a movie" of how the iterations arrive to the solution.
We can run of course many times the program. But we actually we need to
access are res.sample and res.weights (or something similar) during run time.
The text was updated successfully, but these errors were encountered: