joshspeagle / dynesty

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

Bounding update, getting rid of cholesky transform #397

Closed segasai closed 1 year ago

segasai commented 1 year ago

To avoid forgetting this PR gets rid of cholesky transform when constructing ellipsoids. The reason is that since we are doing eigen transform anyway, we don't need to do cholesky on top. The transformation matrix from normal coordinates to ellipsoidal coordinates can be done with cholesky matrix L (where L L^T =C ) or through sqrt(L) V where (L is vector of eigen values and V are eigen vectors).

This speeds up the tests somewhat. On my machine it seems to be ~ 10%.

Also I relaxed one condition when checking whether the point belongs to multiple ellipsoids (in the hope of dealing with #396). Whether that is enough or not I don't know.

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 3170972253


Changes Missing Coverage Covered Lines Changed/Added Lines %
py/dynesty/bounding.py 8 14 57.14%
<!-- Total: 13 19 68.42% -->
Totals Coverage Status
Change from base Build 3088827015: -0.05%
Covered Lines: 3891
Relevant Lines: 4301

💛 - Coveralls