Skip to content
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

Duplicated locs can cause numeric issues #47

Closed
ericbair-sciome opened this issue Jan 27, 2024 · 2 comments · Fixed by #51
Closed

Duplicated locs can cause numeric issues #47

ericbair-sciome opened this issue Jan 27, 2024 · 2 comments · Fixed by #51
Assignees
Labels
bug Something isn't working

Comments

@ericbair-sciome
Copy link
Collaborator

During some recent testing, I noticed that the GP likelihood optimization procedure seems to run into problems when there are duplicate locs (which is likely to be a common occurrence in multivariate models if two outcomes are measured at the same location). I kept getting warnings that the matrices were numerically singular, and usually the procedure would eventually crash. The obvious solution seems to be to add a small amount of noise to the locs to ensure that there are no duplicates. I tried that and it seems to fix the issue. We are already doing this when picking the nearest neighbors (and GPvecchia does the same thing in that case). I am inclined to simply add some noise to the locs at the beginning of vecchia_Mspecify and simply replace the original locs with the "noised up" version for the rest of the model fitting procedure. Let me know if anyone sees a problem with that approach.

@ericbair-sciome ericbair-sciome added the bug Something isn't working label Jan 27, 2024
@ericbair-sciome ericbair-sciome self-assigned this Jan 27, 2024
@kyle-messier
Copy link
Collaborator

@ericbair-sciome Indeed there are likely to be duplicate x,y locs with multivariate data. Seems like a simple and easy fix to me. Thanks!

@ericbair-sciome
Copy link
Collaborator Author

This is fixed in the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants