Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
upd: this post describes background and the first commit of this PR
It's probably more reasonable? But still not a complete fix, see below.
I encountered an error arising from the
A
matrix here having (kinda) negative eigenvalues:NestedSamplers.jl/src/bounds/ellipsoid.jl
Line 108 in eb6999e
This matrix is passed to the
Ellipse
constructor, and fails insqrt
atNestedSamplers.jl/src/bounds/ellipsoid.jl
Line 49 in eb6999e
Actually, eigenvalues of
A
are not negative as-is, but become negative inSymmetric(A)
. Digging into this error, I found that theNestedSamplers.jl/src/bounds/ellipsoid.jl
Lines 168 to 178 in eb6999e
function applies a huge correction to the cov matrix in my case at
NestedSamplers.jl/src/bounds/ellipsoid.jl
Line 105 in eb6999e
Not sure why it is so, and I don't understand the
make_eigvals_positive!
function, what exactly should it do and why? Maybe, adapting the function https://github.com/joshspeagle/dynesty/blob/2c5f1bbe5a0745c6625876f23ec6aa710c845fd4/py/dynesty/bounding.py#L1230 from dynesty would be better?This PR fixes the error with the particular matrix (below) because it has the condition number < 1e10. But I don't think it's a proper solution.
To reproduce my original error in
fit()
: