joshspeagle / dynesty

Dynamic Nested Sampling package for computing Bayesian posteriors and evidences
https://dynesty.readthedocs.io/
MIT License
347 stars 76 forks source link

Add an autocorrelation time estimate to rwalk and rstagger #163

Closed GregoryAshton closed 1 year ago

GregoryAshton commented 4 years ago
joshspeagle commented 4 years ago

Awesome! I'm out on vacation for a few days, but will try to merge this in over the next week.

GregoryAshton commented 4 years ago

@joshspeagle great. Enjoy the holiday.

I would strongly encourage you to run this on some test cases (I see it runs on a bunch of stuff as part of the CI). Only because this is "fiddling with the guts" which makes me nervous :)

joshspeagle commented 4 years ago

Yes, I definitely plan to run a battery of additional tests on harder functions to just check this behaves well. :)

Assuming everything goes well, I'll plan to merge it in and homogenize it so that it can also be used with the other sampling methods. Thanks again for putting this all together!

GregoryAshton commented 4 years ago

I pushed a few more minor changes. I noticed that when one has posterior support at the boundary, one often sees the posterior peak away from from the edge (even when the simulation is set up with the true value at the boundary). This issue was fixed by return a random sample from the chain rather than the last point of the chain. This insight came from chatting with @ColmTalbot about potential biases when the chain only breaks after accepting a point.

GregoryAshton commented 4 years ago

Sorry I push a few more changes. I realised that the emcee method of calculating the ACT was not performing well across a range of problems. I discovered that CPNest implements a much simpler check (which attributes to Will Farr's module). I've implemented this with attribution, but again I'm not certain how to do this.

I also made a few other minor fixes.

joshspeagle commented 4 years ago

So I've now made enough code changes trying to resolve other issues (due to my delay in merging this) that I might have to incorporate some of these changes by hand in the master branch and reject this MR. I'll plan to give you credit in the updated documentation after the final version (v1.0.5) goes live.

segasai commented 1 year ago

This PR is stale for a bit too long, so I will close it.