flatironinstitute / gp-shootout

Benchmark and compare large-scale Gaussian process regression methods in 1D, 2D, and 3D, from MATLAB
Other
5 stars 0 forks source link

unify tolerances #1

Closed ahbarnett closed 2 years ago

ahbarnett commented 2 years ago

We have eps (now opts.tol) as method requested tolerance, but there are various eps, eps/1000, and fixed eps=1e-10 under the hood in EFGP functions. Can we make them all use opts.tol? (are fudge factors needed and if so can it be described why in code comments?) This will speed up some finufft calls at coarse (large) tol.

pgree commented 2 years ago

I just changed and commented the code.

eps is first used for truncating the kernel in time and Fourier domains when the value of the function becomes smaller than eps relative to its maximum. eps then appears in two places.

1) finufft (precompute entries of toeplitz matrix and evaluation of posterior means) - these are only done twice and are often not a major contributor to computational costs. In order to make sure we aren't introducing new errors, I made the tolerance on this smaller than eps. I just changed this to eps / 10.

2) conjugate gradient convergence - I changed the tolerance on this to eps. For kernels that decay slowly in Fourier domain, we can get away with using a tolerance that's a bit larger than epsilon, but we'd have some design choices to make.

ahbarnett commented 2 years ago

Great, thanks for the explanation & updates!

On Wed, Apr 6, 2022 at 6:50 PM pgree @.***> wrote:

I just changed and commented the code.

eps is first used for truncating the kernel in time and Fourier domains when the value of the function becomes smaller than eps relative to its maximum. eps then appears in two places.

1.

finufft (precompute entries of toeplitz matrix and evaluation of posterior means) - these are only done twice and are often not a major contributor to computational costs. In order to make sure we aren't introducing new errors, I made the tolerance on this smaller than eps. I just changed this to eps / 10. 2.

conjugate gradient convergence - I changed the tolerance on this to eps. For kernels that decay slowly in Fourier domain, we can get away with using a tolerance that's a bit larger than epsilon, but we'd have some design choices to make.

— Reply to this email directly, view it on GitHub https://github.com/flatironinstitute/gp-shootout/issues/1#issuecomment-1090889715, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNZRSVTOMIWFVOGDDMAWPTVDYILLANCNFSM5SWQVUJQ . You are receiving this because you authored the thread.Message ID: @.***>

-- *---------------------------------------------------------------------~^`^~._.~' |\ Alex H. Barnett Center for Computational Mathematics, Flatiron Institute | \ http://users.flatironinstitute.org/~ahb 646-876-5942