joshspeagle / dynesty

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

Slow converging #169

Closed minaskar closed 4 years ago

minaskar commented 4 years ago

I'm experimenting with the crash-course example from the docs in high dimensions and I noticed that it takes too long to converge.

In particular, for the 25-dimensional correlated normal, it takes almost 45million likelihood calls or about 25minutes in a high-end i7 CPU. Is this expected?

joshspeagle commented 4 years ago

Yes, this is expected. As discussed in the docs, the majority of the runtime in high-dimensional cases is almost-always dominated by integrating over the prior. In that case, we are integrating out at 10-sigma (roughly speaking). Assuming most of the Gaussian is contained within 3-sigma (ish), this means the prior is larger than the likelihood by a factor of (10/3)^D, leading to runtimes that scale as ~D * log(10/3). You can see this firsthand in the 25-D correlated normal demo, which is also included in the documentation.

Hope this helps.