joshspeagle / dynesty

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

Specify clustering dimensions #218

Closed ColmTalbot closed 3 years ago

ColmTalbot commented 3 years ago

Hi @joshspeagle, this PR would add a new parameter ncdim to specify the number of parameters to do the clustering on. This is distinct from the npdim where the nuisance parameters are things that we don't expect to gain much information for, but we are still interested in being able to associate specific sample values with the measured parameters. Adding in the option to not cluster on these parameters makes ellipsoid construction faster/more reliable for the remaining parameters.

I've tested this with ncdim set and unset for all of the built-in sampling methods with the multi-ellipsoid sampler and it seems to work well. If you're interested in merging this, I'd be happy to do a quick test with the other samplers.

I've tried to follow the repository style, but let me know if there's anything you'd like to change.

joshspeagle commented 3 years ago

This looks fine to me! Merging it in.