-
Notifications
You must be signed in to change notification settings - Fork 0
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
Max-min ordering and nearest neighbor calculation could be optimized #40
Comments
@ericbair-sciome why are we not able to utilize the NN max-min ordering from GPvecchia? or something from the FNN cran package? |
We actually had an internal discussion about this at Sciome a week or two ago. Deepak said that at some point before I started working on this project, there was a desire to calculate the max-min ordering and nearest neighbors for non-Euclidean distances. The GPvecchia functions have Euclidean distance hard coded, and there is no way to override that default. My current plan is to use the GPvecchia functions when we are using Euclidean distance and then use our custom functions when a user specifies a non-Euclidean distance. I have wondered if even that is worth the trouble. I'm tempted to just always use Euclidean distance to calculate (using the GPvecchia functions) the max-min ordering/nearest neighbors and call it a day. (Users would still be able to pas a non-Euclidean distance to the Matern model. Only the ordering and nearest neighbors would use Euclidean distance.) I have found that for reasonably large m, the choice of nearest neighbors doesn't seem to make much difference (provided that the choice is not completely horrible). And I don't think an O(n*log(n)) algorithm for computing nearest neighbors even exists in general for non-Euclidean distances. So, I've wondered if it's even worth giving the user this option. However, if you can imagine any circumstance at all where a user might want to use a non-Euclidean distance function for nearest neighbors, then I will leave it in there. The code is already written; it's just a little slow. The only reason to take it out is if we decided that there is never a good reason to do that and we wanted to avoid giving users the proverbial rope with which to hang themselves. |
Squashed commit of the following: commit cae8439 Merge: c15c519 6bafe5c Author: Eric Bair <eric.bair@sciome.com> Date: Fri Apr 5 16:38:34 2024 -0400 Pull request #40: Imputation beta Merge in STAT/prestogp from eb-dev to master * commit '6bafe5cf9d5574074bdcb0288e4b48efb87a8840': Imputation beta implemented Updated version number commit 6bafe5c Author: Eric Bair <eric.bair@sciome.com> Date: Thu Apr 4 00:17:45 2024 -0400 Imputation beta implemented commit 1f4bcc7 Author: Eric Bair <eric.bair@sciome.com> Date: Sun Mar 17 16:36:13 2024 -0400 Updated version number commit c15c519 Merge: 350b236 bab8357 Author: sciome-bot <software.tools@sciome.com> Date: Thu Feb 8 14:25:12 2024 -0500 Merge branch 'master' of ssh://sciome-bot/stat/prestogp commit 350b236 Merge: 55c0e8e 95fef8c Author: sciome-bot <software.tools@sciome.com> Date: Thu Feb 8 14:24:34 2024 -0500 Merge branch 'main-sciome' of sciome-bot-git:Spatiotemporal-Exposures-and-Toxicology/PrestoGP commit bab8357 Merge: 55c0e8e 5394772 Author: Eric Bair <eric.bair@sciome.com> Date: Thu Feb 8 14:19:24 2024 -0500 Pull request #38: Removed vignette, fixed lint issues Merge in STAT/prestogp from eb-dev to master * commit '53947729624b47fa1920ef39bd23d86f6e5cd7b7': Removed vignette, fixed lint issues commit 55c0e8e Merge: 7e330f3 076c0a1 Author: sciome-bot <software.tools@sciome.com> Date: Thu Feb 8 14:18:48 2024 -0500 Merge branch 'main-sciome' of sciome-bot-git:Spatiotemporal-Exposures-and-Toxicology/PrestoGP commit 5394772 Merge: b431df4 7e330f3 Author: Eric Bair <eric.bair@sciome.com> Date: Thu Feb 8 14:07:54 2024 -0500 Resolved merge conflict commit b431df4 Author: Eric Bair <eric.bair@sciome.com> Date: Thu Feb 8 13:56:38 2024 -0500 Removed vignette, fixed lint issues commit 7e330f3 Merge: 13a6f44 f49d076 Author: sciome-bot <software.tools@sciome.com> Date: Wed Feb 7 23:25:05 2024 -0500 Merge branch 'master' of ssh://sciome-bot/stat/prestogp commit f49d076 Merge: 439790c 59baf72 Author: Eric Bair <eric.bair@sciome.com> Date: Wed Feb 7 23:19:54 2024 -0500 Pull request #35: Eb dev Merge in STAT/prestogp from eb-dev to master * commit '59baf720737abe59a04c98705c950ef1c7b63321': Fixed some documentation issues Removed C++11 compiler flag Added RandomFields data sets to PrestoGP Added knitr to Suggests in DESCRIPTION Documentation, R-cmd-check fixes, binomial regression commit 59baf72 Author: Eric Bair <eric.bair@sciome.com> Date: Tue Feb 6 17:49:48 2024 -0500 Fixed some documentation issues commit d857d8b Author: Eric Bair <eric.bair@sciome.com> Date: Thu Feb 1 02:16:44 2024 -0500 Removed C++11 compiler flag commit 662907d Author: Eric Bair <eric.bair@sciome.com> Date: Wed Jan 31 15:36:37 2024 -0500 Added RandomFields data sets to PrestoGP commit cf2aadb Author: Eric Bair <eric.bair@sciome.com> Date: Wed Jan 31 13:40:24 2024 -0500 Added knitr to Suggests in DESCRIPTION commit ef5f2c9 Author: Eric Bair <eric.bair@sciome.com> Date: Wed Jan 31 01:31:53 2024 -0500 Documentation, R-cmd-check fixes, binomial regression commit 13a6f44 Merge: 439790c 8ffb20b Author: sciome-bot <software.tools@sciome.com> Date: Sun Jan 14 11:46:17 2024 -0500 Merge branch 'main-sciome' of sciome-bot-git:Spatiotemporal-Exposures-and-Toxicology/PrestoGP commit 439790c Merge: f4af0d1 56f881f Author: Eric Bair <eric.bair@sciome.com> Date: Sun Jan 14 10:58:49 2024 -0500 Pull request #32: Fixed some testthat issues Merge in STAT/prestogp from eb-dev to master * commit '56f881f96a0e55e60bca3c8a840ec31291665594': Fixed some testthat issues commit 56f881f Author: Eric Bair <eric.bair@sciome.com> Date: Sat Jan 13 14:05:12 2024 -0500 Fixed some testthat issues commit f4af0d1 Merge: db6cd4f ee193de Author: sciome-bot <software.tools@sciome.com> Date: Sat Jan 13 12:37:28 2024 -0500 Merge branch 'main-sciome' of sciome-bot-git:Spatiotemporal-Exposures-and-Toxicology/PrestoGP ... and 30 more commits
…vert execute permission on all files Squashed commit of the following: commit 00171d7 Merge: cb9236b e0c9039 Author: Shail Choksi <shail.choksi@sciome.com> Date: Tue Apr 9 17:17:39 2024 -0400 Pull request #44: Revert execute permissions on all files Merge in STAT/prestogp from shail-dev-2 to master * commit 'e0c90391f290dd2f6ebe62f6a69db8ec006c1872': chmod changes Implement imputation beta commit e0c9039 Merge: b8f91fd 05e7dfb Author: sciome-bot <software.tools@sciome.com> Date: Tue Apr 9 17:16:29 2024 -0400 Merge branch 'to-git' of ssh://sciome-bot/stat/prestogp into shail-dev-2 commit b8f91fd Author: sciome-bot <software.tools@sciome.com> Date: Tue Apr 9 17:10:53 2024 -0400 chmod changes commit cb9236b Merge: cae8439 218a18a Author: Eric Bair <eric.bair@sciome.com> Date: Tue Apr 9 17:03:10 2024 -0400 Pull request #42: Fixed a documentation issue Merge in STAT/prestogp from eb-dev to master * commit '218a18a6cd2891c7c4975e408f7308243c11abbf': Fixed a documentation issue commit 218a18a Author: Eric Bair <eric.bair@sciome.com> Date: Mon Apr 8 02:18:24 2024 -0400 Fixed a documentation issue commit cae8439 Merge: c15c519 6bafe5c Author: Eric Bair <eric.bair@sciome.com> Date: Fri Apr 5 16:38:34 2024 -0400 Pull request #40: Imputation beta Merge in STAT/prestogp from eb-dev to master * commit '6bafe5cf9d5574074bdcb0288e4b48efb87a8840': Imputation beta implemented Updated version number commit 6bafe5c Author: Eric Bair <eric.bair@sciome.com> Date: Thu Apr 4 00:17:45 2024 -0400 Imputation beta implemented commit 1f4bcc7 Author: Eric Bair <eric.bair@sciome.com> Date: Sun Mar 17 16:36:13 2024 -0400 Updated version number commit c15c519 Merge: 350b236 bab8357 Author: sciome-bot <software.tools@sciome.com> Date: Thu Feb 8 14:25:12 2024 -0500 Merge branch 'master' of ssh://sciome-bot/stat/prestogp commit 350b236 Merge: 55c0e8e 95fef8c Author: sciome-bot <software.tools@sciome.com> Date: Thu Feb 8 14:24:34 2024 -0500 Merge branch 'main-sciome' of sciome-bot-git:Spatiotemporal-Exposures-and-Toxicology/PrestoGP commit bab8357 Merge: 55c0e8e 5394772 Author: Eric Bair <eric.bair@sciome.com> Date: Thu Feb 8 14:19:24 2024 -0500 Pull request #38: Removed vignette, fixed lint issues Merge in STAT/prestogp from eb-dev to master * commit '53947729624b47fa1920ef39bd23d86f6e5cd7b7': Removed vignette, fixed lint issues commit 55c0e8e Merge: 7e330f3 076c0a1 Author: sciome-bot <software.tools@sciome.com> Date: Thu Feb 8 14:18:48 2024 -0500 Merge branch 'main-sciome' of sciome-bot-git:Spatiotemporal-Exposures-and-Toxicology/PrestoGP commit 5394772 Merge: b431df4 7e330f3 Author: Eric Bair <eric.bair@sciome.com> Date: Thu Feb 8 14:07:54 2024 -0500 Resolved merge conflict commit b431df4 Author: Eric Bair <eric.bair@sciome.com> Date: Thu Feb 8 13:56:38 2024 -0500 Removed vignette, fixed lint issues commit 7e330f3 Merge: 13a6f44 f49d076 Author: sciome-bot <software.tools@sciome.com> Date: Wed Feb 7 23:25:05 2024 -0500 Merge branch 'master' of ssh://sciome-bot/stat/prestogp commit f49d076 Merge: 439790c 59baf72 Author: Eric Bair <eric.bair@sciome.com> Date: Wed Feb 7 23:19:54 2024 -0500 Pull request #35: Eb dev Merge in STAT/prestogp from eb-dev to master * commit '59baf720737abe59a04c98705c950ef1c7b63321': Fixed some documentation issues Removed C++11 compiler flag Added RandomFields data sets to PrestoGP Added knitr to Suggests in DESCRIPTION Documentation, R-cmd-check fixes, binomial regression commit 59baf72 Author: Eric Bair <eric.bair@sciome.com> Date: Tue Feb 6 17:49:48 2024 -0500 Fixed some documentation issues commit d857d8b Author: Eric Bair <eric.bair@sciome.com> Date: Thu Feb 1 02:16:44 2024 -0500 Removed C++11 compiler flag commit 662907d Author: Eric Bair <eric.bair@sciome.com> Date: Wed Jan 31 15:36:37 2024 -0500 Added RandomFields data sets to PrestoGP commit cf2aadb Author: Eric Bair <eric.bair@sciome.com> Date: Wed Jan 31 13:40:24 2024 -0500 Added knitr to Suggests in DESCRIPTION ... and 35 more commits
Squashed commit of the following: commit 4aa13ad Author: sciome-bot <software.tools@sciome.com> Date: Wed Apr 24 20:16:19 2024 -0400 Remove dependency on sysreqs to fix sanitizer action. commit 7fad5a6 Merge: 3f3c9e3 df836b7 Author: sciome-bot <software.tools@sciome.com> Date: Wed Apr 24 20:12:09 2024 -0400 Merge branch 'main-sciome' of sciome-bot-git:NIEHS/PrestoGP commit 3f3c9e3 Author: Eric Bair <eric.bair@sciome.com> Date: Wed Apr 24 17:17:41 2024 -0400 Observation-level lod, imputation tests, updated README Squashed commit of the following: commit 9dfcef3 Merge: 33b0560 68671e6 Author: Eric Bair <eric.bair@sciome.com> Date: Tue Apr 23 16:41:15 2024 -0400 Merge branch 'master' of http://192.168.167.103:7990/bitbucket/scm/stat/prestogp into eb-dev Conflicts: README.md commit 33b0560 Author: Eric Bair <eric.bair@sciome.com> Date: Tue Apr 23 03:05:12 2024 -0400 Observation-level lod, imputation tests, updated README commit 68671e6 Merge: 00171d7 7fe8997 Author: sciome-bot <software.tools@sciome.com> Date: Wed Apr 10 09:51:12 2024 -0400 Merge branch 'main-sciome' of sciome-bot-git:NIEHS/PrestoGP commit 00171d7 Merge: cb9236b e0c9039 Author: Shail Choksi <shail.choksi@sciome.com> Date: Tue Apr 9 17:17:39 2024 -0400 Pull request #44: Revert execute permissions on all files Merge in STAT/prestogp from shail-dev-2 to master * commit 'e0c90391f290dd2f6ebe62f6a69db8ec006c1872': chmod changes Implement imputation beta commit e0c9039 Merge: b8f91fd 05e7dfb Author: sciome-bot <software.tools@sciome.com> Date: Tue Apr 9 17:16:29 2024 -0400 Merge branch 'to-git' of ssh://sciome-bot/stat/prestogp into shail-dev-2 commit b8f91fd Author: sciome-bot <software.tools@sciome.com> Date: Tue Apr 9 17:10:53 2024 -0400 chmod changes commit cb9236b Merge: cae8439 218a18a Author: Eric Bair <eric.bair@sciome.com> Date: Tue Apr 9 17:03:10 2024 -0400 Pull request #42: Fixed a documentation issue Merge in STAT/prestogp from eb-dev to master * commit '218a18a6cd2891c7c4975e408f7308243c11abbf': Fixed a documentation issue commit 218a18a Author: Eric Bair <eric.bair@sciome.com> Date: Mon Apr 8 02:18:24 2024 -0400 Fixed a documentation issue commit cae8439 Merge: c15c519 6bafe5c Author: Eric Bair <eric.bair@sciome.com> Date: Fri Apr 5 16:38:34 2024 -0400 Pull request #40: Imputation beta Merge in STAT/prestogp from eb-dev to master * commit '6bafe5cf9d5574074bdcb0288e4b48efb87a8840': Imputation beta implemented Updated version number commit 6bafe5c Author: Eric Bair <eric.bair@sciome.com> Date: Thu Apr 4 00:17:45 2024 -0400 Imputation beta implemented commit 1f4bcc7 Author: Eric Bair <eric.bair@sciome.com> Date: Sun Mar 17 16:36:13 2024 -0400 Updated version number commit c15c519 Merge: 350b236 bab8357 Author: sciome-bot <software.tools@sciome.com> Date: Thu Feb 8 14:25:12 2024 -0500 Merge branch 'master' of ssh://sciome-bot/stat/prestogp commit 350b236 Merge: 55c0e8e 95fef8c Author: sciome-bot <software.tools@sciome.com> Date: Thu Feb 8 14:24:34 2024 -0500 Merge branch 'main-sciome' of sciome-bot-git:Spatiotemporal-Exposures-and-Toxicology/PrestoGP commit bab8357 Merge: 55c0e8e 5394772 Author: Eric Bair <eric.bair@sciome.com> Date: Thu Feb 8 14:19:24 2024 -0500 Pull request #38: Removed vignette, fixed lint issues Merge in STAT/prestogp from eb-dev to master * commit '53947729624b47fa1920ef39bd23d86f6e5cd7b7': Removed vignette, fixed lint issues commit 55c0e8e Merge: 7e330f3 076c0a1 Author: sciome-bot <software.tools@sciome.com> Date: Thu Feb 8 14:18:48 2024 -0500 Merge branch 'main-sciome' of sciome-bot-git:Spatiotemporal-Exposures-and-Toxicology/PrestoGP commit 5394772 Merge: b431df4 7e330f3 Author: Eric Bair <eric.bair@sciome.com> Date: Thu Feb 8 14:07:54 2024 -0500 Resolved merge conflict commit b431df4 Author: Eric Bair <eric.bair@sciome.com> Date: Thu Feb 8 13:56:38 2024 -0500 Removed vignette, fixed lint issues commit 7e330f3 Merge: 13a6f44 f49d076 Author: sciome-bot <software.tools@sciome.com> Date: Wed Feb 7 23:25:05 2024 -0500 Merge branch 'master' of ssh://sciome-bot/stat/prestogp commit f49d076 Merge: 439790c 59baf72 Author: Eric Bair <eric.bair@sciome.com> Date: Wed Feb 7 23:19:54 2024 -0500 Pull request #35: Eb dev Merge in STAT/prestogp from eb-dev to master * commit '59baf720737abe59a04c98705c950ef1c7b63321': Fixed some documentation issues Removed C++11 compiler flag Added RandomFields data sets to PrestoGP Added knitr to Suggests in DESCRIPTION Documentation, R-cmd-check fixes, binomial regression ... and 37 more commits
Squashed commit of the following: commit aa730b5 Merge: 4aa13ad d596c46 Author: Eric Bair <eric.bair@sciome.com> Date: Fri Apr 26 14:26:42 2024 -0400 Pull request #48: Eb dev Merge in STAT/prestogp from eb-dev to master * commit 'd596c46f0d84704329b02cdf39f419e1ee9f626b': Fixed file permissions Removed the spam dependency to fix an R CMD check issue Observation-level lod, imputation tests, updated README commit d596c46 Author: Eric Bair <eric.bair@sciome.com> Date: Fri Apr 26 14:05:23 2024 -0400 Fixed file permissions commit 6543908 Merge: 86bdd92 4aa13ad Author: Eric Bair <eric.bair@sciome.com> Date: Thu Apr 25 18:19:08 2024 -0400 Fixed a merge conflict commit 86bdd92 Author: Eric Bair <eric.bair@sciome.com> Date: Thu Apr 25 18:11:04 2024 -0400 Removed the spam dependency to fix an R CMD check issue commit 4aa13ad Author: sciome-bot <software.tools@sciome.com> Date: Wed Apr 24 20:16:19 2024 -0400 Remove dependency on sysreqs to fix sanitizer action. commit 7fad5a6 Merge: 3f3c9e3 df836b7 Author: sciome-bot <software.tools@sciome.com> Date: Wed Apr 24 20:12:09 2024 -0400 Merge branch 'main-sciome' of sciome-bot-git:NIEHS/PrestoGP commit 3f3c9e3 Author: Eric Bair <eric.bair@sciome.com> Date: Wed Apr 24 17:17:41 2024 -0400 Observation-level lod, imputation tests, updated README Squashed commit of the following: commit 9dfcef3 Merge: 33b0560 68671e6 Author: Eric Bair <eric.bair@sciome.com> Date: Tue Apr 23 16:41:15 2024 -0400 Merge branch 'master' of http://192.168.167.103:7990/bitbucket/scm/stat/prestogp into eb-dev Conflicts: README.md commit 33b0560 Author: Eric Bair <eric.bair@sciome.com> Date: Tue Apr 23 03:05:12 2024 -0400 Observation-level lod, imputation tests, updated README commit 9dfcef3 Merge: 33b0560 68671e6 Author: Eric Bair <eric.bair@sciome.com> Date: Tue Apr 23 16:41:15 2024 -0400 Merge branch 'master' of http://192.168.167.103:7990/bitbucket/scm/stat/prestogp into eb-dev Conflicts: README.md commit 33b0560 Author: Eric Bair <eric.bair@sciome.com> Date: Tue Apr 23 03:05:12 2024 -0400 Observation-level lod, imputation tests, updated README commit 68671e6 Merge: 00171d7 7fe8997 Author: sciome-bot <software.tools@sciome.com> Date: Wed Apr 10 09:51:12 2024 -0400 Merge branch 'main-sciome' of sciome-bot-git:NIEHS/PrestoGP commit 00171d7 Merge: cb9236b e0c9039 Author: Shail Choksi <shail.choksi@sciome.com> Date: Tue Apr 9 17:17:39 2024 -0400 Pull request #44: Revert execute permissions on all files Merge in STAT/prestogp from shail-dev-2 to master * commit 'e0c90391f290dd2f6ebe62f6a69db8ec006c1872': chmod changes Implement imputation beta commit e0c9039 Merge: b8f91fd 05e7dfb Author: sciome-bot <software.tools@sciome.com> Date: Tue Apr 9 17:16:29 2024 -0400 Merge branch 'to-git' of ssh://sciome-bot/stat/prestogp into shail-dev-2 commit b8f91fd Author: sciome-bot <software.tools@sciome.com> Date: Tue Apr 9 17:10:53 2024 -0400 chmod changes commit cb9236b Merge: cae8439 218a18a Author: Eric Bair <eric.bair@sciome.com> Date: Tue Apr 9 17:03:10 2024 -0400 Pull request #42: Fixed a documentation issue Merge in STAT/prestogp from eb-dev to master * commit '218a18a6cd2891c7c4975e408f7308243c11abbf': Fixed a documentation issue commit 218a18a Author: Eric Bair <eric.bair@sciome.com> Date: Mon Apr 8 02:18:24 2024 -0400 Fixed a documentation issue commit cae8439 Merge: c15c519 6bafe5c Author: Eric Bair <eric.bair@sciome.com> Date: Fri Apr 5 16:38:34 2024 -0400 Pull request #40: Imputation beta Merge in STAT/prestogp from eb-dev to master * commit '6bafe5cf9d5574074bdcb0288e4b48efb87a8840': Imputation beta implemented Updated version number commit 6bafe5c Author: Eric Bair <eric.bair@sciome.com> Date: Thu Apr 4 00:17:45 2024 -0400 Imputation beta implemented commit 1f4bcc7 Author: Eric Bair <eric.bair@sciome.com> Date: Sun Mar 17 16:36:13 2024 -0400 Updated version number commit c15c519 Merge: 350b236 bab8357 Author: sciome-bot <software.tools@sciome.com> Date: Thu Feb 8 14:25:12 2024 -0500 Merge branch 'master' of ssh://sciome-bot/stat/prestogp commit 350b236 Merge: 55c0e8e 95fef8c Author: sciome-bot <software.tools@sciome.com> Date: Thu Feb 8 14:24:34 2024 -0500 Merge branch 'main-sciome' of sciome-bot-git:Spatiotemporal-Exposures-and-Toxicology/PrestoGP ... and 43 more commits
Merge in STAT/prestogp from eb-dev to master * commit '6bafe5cf9d5574074bdcb0288e4b48efb87a8840': Imputation beta implemented Updated version number
I believe that our current functions for computing the max-min ordering and nearest neighbors could be improved to reduce running time. Specifically, I believe our current implementations are O(n^2) but O(n*log(n)) algorithms exist. See this paper for details:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6707751/
I think there are other optimizations that would give us more bang for our buck, so this is low priority for now. But I wanted to log it so we don't forget about it.
The text was updated successfully, but these errors were encountered: