joshspeagle / dynesty

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

Arguments to NestedSampler DynamicNestedSampler #293

Closed segasai closed 3 years ago

segasai commented 3 years ago

One constant issue I'm hitting with dynesty is that NestedSampler and DynamicSampler do not check for keyword arguments. I.e. I often tried to initialize DynamicSampler with nlive parameter which does not do anything. I also occasionally provided stop_kwargs to the nested sampler and that is basically silently ignored. That can be particularly painful with nlive parameter.

I think my preferred solution is to not allow freeform kwargs for NestedSamplers so we'd get the exception. Also, it may be good to use nlive parameter of Dynamic nested sampler as nlive_init if they were not specified explicitely.

joshspeagle commented 3 years ago

I was about to recommend exactly the type of solution you just submitted for the PR. Removing the freeform kwargs is a bit painful, but I agree avoiding the silent failures is probably worth it.

segasai commented 3 years ago

Fixed in #295