joshspeagle / dynesty

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

logzvar issues with large negative loglike #76

Closed joshspeagle closed 6 years ago

joshspeagle commented 6 years ago

According to @guillochon, if the likelihood function ever returns a huge negative number for logl like -1e16, logzvar (and logl_bounds) evaluates to nan. This is clearly some type of bug, so I'll see if I can track it down.

joshspeagle commented 6 years ago

Turns out this isn't a bug but confusion over outputs which are not properly explained in the docs. I've added additional details to the doc updates issue (#55) to address this in the near future.

sharanbngr commented 6 years ago

Hi @joshspeagle, I am having the same logzvar becoming nan problem. Could you please point me to the updated documentation on this? I am having trouble finding it.

Thanks a lot!

joshspeagle commented 6 years ago

Ah, that would be because I haven't gotten around to it yet...

Essentially, there's no need to worry in most cases. The logzvar approximation sometimes breaks when the log-likelihood changes really rapidly and the log-volume is still quite uncertain. You can simulate the actual logz error using the jitter_run, resample_run, and simulate_run utility functions provided in utils.

sharanbngr commented 6 years ago

Ah, I think what I am seeing makes sense with that. Thanks!