Closed segasai closed 3 years ago
It looks like https://github.com/joshspeagle/dynesty/blob/858bb15dedcff600617cecb77fd6f3f2cc9fb3c9/dynesty/sampler.py#L379 here there is basically an infinite loop when all the likelihood values are the same.
Also, I remember reading something in arxiv about this: https://arxiv.org/abs/2010.13884 So apparently in multinest there are tiny perturbations to logl values that resolve that issue (which are technically not quite right)
Yes, this is a fundamental issue with nested sampling -- it can't deal with likelihood slabs (it requires a unique mapping from a particular likelihood value L to a particular prior volume X, which is broken if this is a region rather than a contour). The tiny perturbations might be a practical fix to this problem, but it's an edge case for sure.
I think one potential way of dealing in practice is to at least raise a warning if all the likelihood values of live-points are exactly the same and proposal fails for many iterations to alarm the user of the problem.
Yea, this is a good idea. I'll put a note down to add a check, flag, and warning for users if it looks like we've hit this particular edge-case.
I'm having a problem where I think it's possible that there are regions of similar likelihood values causing difficulties with sampling. I have looked through the code but I'm not sure I understand how to return and check the likelihood values of live points to diagnose the problem; would it be possible for any advice on how to go about this until the fix is implemented? Thanks
You should be able to access the live points directly using the sampler.live_[u,v,logl]
which correspond to their locations in the unit cube, transformed position, and log-likelihood, respectively.
Hi,
while adding tests I noticed that the uniform distribution fails to sample with current code. It looks like it's connected to this https://github.com/joshspeagle/dynesty/pull/203
I don't actually know what's the fix here.