Closed segasai closed 3 years ago
One thought I had is to maybe not run this https://github.com/joshspeagle/dynesty/blob/2c70dbee7ac3868d251bdc7a3e99d565ae11506f/py/dynesty/dynamicsampler.py#L1166 with dlogz=0 but small dlogz. (1e-3,1e-5 or something). We can then warn a user if logl_max wasn't reached, but still proceed.
That is an excellent idea! Great find. Yes, setting dlogz=1e-3
and then throwing a warning if the logl_max
wasn't reached should be a perfect solution for this problem in general.
Okay, I've still got an issue with dynamic slice sampling.
The diagnosis reveals the following problem. See the plot
The black points show u in one dimension vs likelihood in saved_run, and red points show stuff from current new_run. Basically what seems to happen -- when the points are sampled for the batch and then the sampling continues from them, they miss the narrow posterior mode, so they are stuck in a lower mode, and therefore they can't reach the actual mode. Because the batch sampling is set up in such a way to not stop until we hit logl_max, it never finishes till all logl are constant and slice sampling can't go on.
I'm not sure there is an easy fix here. But in the same time, the failure doesn't sound so unlikely to me, if we have a wide mode and a bit higher narrow mode. So it's probably worth trying to do something about it.