joshspeagle / dynesty

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

live point's likelihood not valid #453

Closed npassaleva closed 10 months ago

npassaleva commented 11 months ago

Dynesty version: 2.1.2

SETUP: with MPIPool() as pool: if not pool.is_master(): pool.wait() sys.exit(0)

                    dsampler = dynesty.NestedSampler(lnlike, log_prior_nested, ndim=ndim,
                                                bound='multi', sample='unif', rstate=rstate, pool=pool)
                    dsampler.run_nested(checkpoint_file=dir_out+dynestysave)

Hi my dynesty sampling is stopping because the of the error: "The log-likelihood of live point is invalid". I was wondering how I can overcome this problem. I've already launched my code with the same likelihood but different data set and it works so I can't figured out which is the problem. Thank you

segasai commented 11 months ago

Please follow the template how to report issues https://github.com/joshspeagle/dynesty/blob/master/.github/ISSUE_TEMPLATE/bug_report.md

npassaleva commented 11 months ago

I apologize, is it now correct?

segasai commented 11 months ago

Thanks The error means that your likelihood returns values that either +Inf or NaN which is not allowed.

npassaleva commented 11 months ago

Is there a way to check the values of the parameters that produce these results?

segasai commented 11 months ago

i would suggest inserting print statements inside your function.

segasai commented 10 months ago

closing as not a bug