Skip to content

Allowing small negative Eigen values in prior matrices #855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nadrino
Copy link
Collaborator

@nadrino nadrino commented Jul 18, 2025

For large matrices (4000x4000), decomposing often leads to a bunch of Eigen values close to zero and even slightly negative. These are due to numerical noise. The current version of GUNDAM stops the runtime asking to fix the matrix or apply a threshold on the Eigen values. This PR replaces it with an ALERT message letting numerical noise as it is

@nadrino nadrino added the feature/enhancement ✨ New feature or request label Jul 18, 2025
@ClarkMcGrew
Copy link
Contributor

This isn't a good idea since we already have options to handle this. It's also super bad to "hide" this from analyzers. If they are using a bad covariance (almost degenerate), then they really need to control how they work around it, and we do provide the tools.

@nadrino
Copy link
Collaborator Author

nadrino commented Jul 18, 2025

I see, don't you think only keeping positive Eigen noise value would not introduce a bias somehow?

@ClarkMcGrew
Copy link
Contributor

I'm not sure what it "means" for a covariance to have a negative eigenvalue. I think it's completely non-physical because it implies that a variable has a variance that isn't equal to it's own variance (yes, that's contradictory).

I think negative eigenvalues happen because of imprecision in the covariance, and should be interpreted as zero (and, if the value becomes too negative, there are real problems with the inputs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/enhancement ✨ New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants