# Probability distribution over geographic coordinates

I would like to model some quantity y that varies over different locations on the Earth using a Gaussian process. My concern with just using f(y|latitude, longitude), is that this assumes a Euclidean space over latitude and longitude, but clearly this is bad--I'd want something that works with a spherical system. Links to resources would be much appreciated.

While you can of course use the squares exponential kernel as previously mentioned, there are in fact many kernels which decay monotonically with Euclidean distance. For example the matern kernels, the exponential kernel etc. The core difference between these is how smooth you expect the output function to look. These are all stationary kernels and use either absolute value or square (ie if you shift your input the relative similarity is preserved). As such you can switch $$(x_* - x)$$ with, for example, the arc length about the sphere between the two points - this would be a valid kernel.

Another option, albeit less well known, are Gauss Markova Random Fields which have the same formulation as a Gaussian process but are parameterizes by the precision matrix and encode the fact that only neighboring nodes (or countries in your case) may interact with one another. Might be worth checking out! Good luck.

• How does this address the question? OP has asked about kernels respecting the spherical nature of the lat/long coordinate system.
– Sycorax
Jul 11, 2019 at 22:26
• @Sycorax the first part of the answer shows how you can use spherical coordinates rather than Euclidean distance (more generally than just updated the RBF kernel as previously stated). With regard to GMRF they are used often in the type of problem and are essentially still a GP however the inverse is parameterizes rather than the kernel - I figured pointing in that direction may be useful to someone trying to work in these problems despite being less commonly known.
– j__
Jul 12, 2019 at 5:56
• The assumption that a kernel (expressed as a function of distance) remains valid when you use a non-Euclidean metric is incorrect. The problem is that the resulting function might fail to be positive-definite.
– whuber
Jul 15, 2019 at 15:00

Lindgren et al 2011 addresses this by specifying the GP as a solution to a stochastic partial differential equation. The stationary solutions have Matern covariance.

See Figure 4 for an example in the paper of estimation on the sphere. The method is implemented in the R-INLA package, I'm not sure about implementations outside of R.

It might be useful to look into Riemannian distance metric [https://maths-people.anu.edu.au/~andrews/DG/DG_chap9.pdf] and geodesics [https://www.youtube.com/watch?v=8sVDceI70HM&list=PLJHszsWbB6hpk5h8lSfBkVrpjsqvUGTCx&index=18]

• Because the Riemann metric on the sphere is non-Euclidean, it's difficult to see how this recommendation applies or could be valid.
– whuber
Jul 11, 2019 at 15:43
• @whuber I think you could construct such a kernel by replacing Euclidean element of the common kernels with such a distance metric. Two approaches to prove that this would be a valid RKHS would be to show Bochners theorem still holds, or perhaps that there is a monotonic mapping between such a distance and Euclidean distance (in which case it would be equivalent to warping the input space onto a manifold). Could be a somewhat interesting result...
– j__
Jul 11, 2019 at 20:46