joshspeagle / dynesty

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

Possible improvement to the way we are dealing with degenerate ellipsoids #264

Closed segasai closed 3 years ago

segasai commented 3 years ago

I was thinking of changing the covariance matrix is 'improved' when it's invalid. As often the problem is that the ellipsoid is degenerate with eigen values being very small, a better fix should be keeping the eigen vectors and increasing the problematic eigen values to some level. This has the advantage of better preserving the shape of the ellipsoid in non-problematic dimensions. The code is less pretty though.

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 878850735


Changes Missing Coverage Covered Lines Changed/Added Lines %
py/dynesty/bounding.py 17 22 77.27%
<!-- Total: 17 22 77.27% -->
Files with Coverage Reduction New Missed Lines %
py/dynesty/bounding.py 1 77.04%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 873048010: -0.05%
Covered Lines: 3381
Relevant Lines: 4705

💛 - Coveralls
joshspeagle commented 3 years ago

As often the problem is that the ellipsoid is degenerate with eigen values being very small, a better fix should be keeping the eigen vectors and increasing the problematic eigen values to some level. The code is less pretty though.

Agreed on both counts. The change also looks nice.