Related terms and techniques Kriging predicts the value of a function at a given point by computing a weighted average of the known values of the function in the neighborhood of the point. The method is closely related to
regression analysis. Both theories derive a
best linear unbiased estimator based on assumptions on
covariances, make use of
Gauss–Markov theorem to prove independence of the estimate and error, and use very similar formulae. Even so, they are useful in different frameworks: kriging is made for estimation of a single realization of a random field, while regression models are based on multiple observations of a multivariate data set. The kriging estimation may also be seen as a
spline in a
reproducing kernel Hilbert space, with the reproducing kernel given by the covariance function. The difference with the classical kriging approach is provided by the interpretation: while the spline is motivated by a minimum-norm interpolation based on a Hilbert-space structure, kriging is motivated by an expected squared prediction error based on a stochastic model. Kriging with
polynomial trend surfaces is mathematically identical to
generalized least squares polynomial
curve fitting. Kriging can also be understood as a form of
Bayesian optimization. Kriging starts with a
prior distribution over
functions. This prior takes the form of a Gaussian process: N samples from a function will be
normally distributed, where the
covariance between any two samples is the covariance function (or
kernel) of the Gaussian process evaluated at the spatial location of two points. A
set of values is then observed, each value associated with a spatial location. Now, a new value can be predicted at any new spatial location by combining the Gaussian prior with a Gaussian
likelihood function for each of the observed values. The resulting
posterior distribution is also Gaussian, with a mean and covariance that can be simply computed from the observed values, their variance, and the kernel matrix derived from the prior.
Geostatistical estimator In geostatistical models, sampled data are interpreted as the result of a random process. The fact that these models incorporate uncertainty in their conceptualization does not mean that the phenomenon – the forest, the aquifer, the mineral deposit – has resulted from a random process, but rather it allows one to build a methodological basis for the spatial inference of quantities in unobserved locations and to quantify the uncertainty associated with the estimator. patch refined using ordinary kriging (visualized with
matplotlib) A
stochastic process is, in the context of this model, simply a way to approach the set of data collected from the samples. The first step in geostatistical modulation is to create a random process that best describes the set of observed data. A value from location x_1 (generic denomination of a set of
geographic coordinates) is interpreted as a realization z(x_1) of the
random variable Z(x_1). In the space A, where the set of samples is dispersed, there are N realizations of the random variables Z(x_1), Z(x_2), \ldots, Z(x_N), correlated between themselves. The set of random variables constitutes a random function, of which only one realization is known – the set z(x_i) of observed data. With only one realization of each random variable, it's theoretically impossible to determine any
statistical parameter of the individual variables or the function. The proposed solution in the geostatistical formalism consists in
assuming various degrees of
stationarity in the random function, in order to make the inference of some statistic values possible. For instance, if one assumes, based on the homogeneity of samples in area A where the variable is distributed, the hypothesis that the
first moment is stationary (i.e. all random variables have the same mean), then one is assuming that the mean can be estimated by the arithmetic mean of sampled values. The hypothesis of stationarity related to the
second moment is defined in the following way: the correlation between two random variables solely depends on the spatial distance between them and is independent of their location. Thus if \mathbf{h} = x_2 - x_1 and h = |\mathbf{h}|, then: : C\big(Z(x_1), Z(x_2)\big) = C\big(Z(x_i), Z(x_i + \mathbf{h})\big) = C(h), : \gamma\big(Z(x_1), Z(x_2)\big) = \gamma\big(Z(x_i), Z(x_i + \mathbf{h})\big) = \gamma(h). For simplicity, we define C(x_i, x_j) = C\big(Z(x_i), Z(x_j)\big) and \gamma(x_i, x_j) = \gamma\big(Z(x_i), Z(x_j)\big). This hypothesis allows one to infer those two measures – the
variogram and the
covariogram: : \gamma(h) = \frac{1}{2|N(h)|} \sum_{(i,j)\in N(h)} \big(Z(x_i) - Z(x_j)\big)^2, : C(h) = \frac{1} \sum_{(i,j)\in N(h)} \big(Z(x_i) - m(h)\big)\big(Z(x_j) - m(h)\big), where: : m(h)=\frac{1}{2|N(h)|} \sum_{(i,j)\in N(h)} \left( Z(x_i) + Z(x_j) \right); : N(h) denotes the set of pairs of observations i,\;j such that |x_i - x_j| = h, and |N(h)| is the number of pairs in the set. In this set, (i,\;j) and (j,\;i) denote the same element. Generally an "approximate distance" h is used, implemented using a certain tolerance.
Linear estimation Spatial inference, or estimation, of a quantity Z \colon \mathbb{R}^n \to \mathbb{R}, at an unobserved location x_0, is calculated from a linear combination of the observed values z_i = Z(x_i) and weights w_i(x_0),\; i = 1, \ldots, N: : \hat{Z}(x_0) = \begin{bmatrix} w_1 & w_2 & \cdots & w_N \end{bmatrix} \begin{bmatrix} z_1 \\ z_2 \\ \vdots \\ z_N \end{bmatrix} = \sum_{i=1}^N w_i(x_0) Z(x_i). The weights w_i are intended to summarize two extremely important procedures in a spatial inference process: • reflect the structural "proximity" of samples to the estimation location x_0; • at the same time, they should have a desegregation effect, in order to avoid bias caused by eventual sample
clusters. When calculating the weights w_i, there are two objectives in the geostatistical formalism:
unbias and
minimal variance of estimation. If the cloud of real values Z(x_0) is plotted against the estimated values \hat{Z}(x_0), the criterion for global unbias,
intrinsic stationarity or
wide sense stationarity of the field, implies that the mean of the estimations must be equal to mean of the real values. The second criterion says that the mean of the squared deviations \big(\hat{Z}(x) - Z(x)\big) must be minimal, which means that when the cloud of estimated values
versus the cloud real values is more disperse, the estimator is more imprecise. ==Methods==