Skip to content

Latest commit

 

History

History
196 lines (157 loc) · 5.09 KB

kriging.md

File metadata and controls

196 lines (157 loc) · 5.09 KB

Kriging

!!! note

This section describes the Kriging models used in the [`Interpolate`](@ref) transform.
Most users don't want to use models directly because they lack features such as
neighborhood search and change of support.

A Kriging model has the form:

$$\hat{Z}(\x_0) = \lambda_1 Z(\x_1) + \lambda_2 Z(\x_2) + \cdots + \lambda_n Z(\x_n),\quad \x_i \in \R^m, \lambda_i \in \R$$

with Z\colon \R^m \times \Omega \to \R a random field.

This package implements the following Kriging variants:

  • Simple Kriging
  • Ordinary Kriging
  • Universal Kriging
  • External Drift Kriging

All these variants follow the same interface: an object is first created with a given set of parameters, it is then combined with the data to obtain predictions at new geometries.

The fit function takes care of building the Kriging system and factorizing the LHS with an appropriate decomposition (e.g. Cholesky, LU), and the predict (or predictprob) function performs the estimation for a given variable and geometry.

All variants work with general Hilbert spaces, meaning that one can interpolate any data type that implements scalar multiplication, vector addition and inner product.

Simple Kriging

In Simple Kriging, the mean \mu of the random field is assumed to be constant and known. The resulting linear system is:

$$\begin{bmatrix} cov(\x_1,\x_1) & cov(\x_1,\x_2) & \cdots & cov(\x_1,\x_n) \\\ cov(\x_2,\x_1) & cov(\x_2,\x_2) & \cdots & cov(\x_2,\x_n) \\\ \vdots & \vdots & \ddots & \vdots \\\ cov(\x_n,\x_1) & cov(\x_n,\x_2) & \cdots & cov(\x_n,\x_n) \end{bmatrix} \begin{bmatrix} \lambda_1 \\\ \lambda_2 \\\ \vdots \\\ \lambda_n \end{bmatrix} = \begin{bmatrix} cov(\x_1,\x_0) \\\ cov(\x_2,\x_0) \\\ \vdots \\\ cov(\x_n,\x_0) \end{bmatrix}$$

or in matricial form \C\l = \c. We subtract the given mean from the observations \boldsymbol{y} = \z - \mu \1 and compute the mean and variance at location \x_0:

$$\mu(\x_0) = \mu + \boldsymbol{y}^\top \l$$ $$\sigma^2(\x_0) = cov(0) - \c^\top \l$$
GeoStatsModels.SimpleKriging

Ordinary Kriging

In Ordinary Kriging the mean of the random field is assumed to be constant and unknown. The resulting linear system is:

$$\begin{bmatrix} \G & \1 \\\ \1^\top & 0 \end{bmatrix} \begin{bmatrix} \l \\\ \nu \end{bmatrix} = \begin{bmatrix} \g \\\ 1 \end{bmatrix}$$

with \nu the Lagrange multiplier associated with the constraint \1^\top \l = 1. The mean and variance at location \x_0 are given by:

$$\mu(\x_0) = \z^\top \l$$ $$\sigma^2(\x_0) = \begin{bmatrix} \g \\ 1 \end{bmatrix}^\top \begin{bmatrix} \l \\ \nu \end{bmatrix}$$
GeoStatsModels.OrdinaryKriging

Universal Kriging

In Universal Kriging, the mean of the random field is assumed to be a polynomial of the spatial coordinates:

$$\mu(\x) = \sum_{k=1}^{N_d} \beta_k f_k(\x)$$

with N_d monomials f_k of degree up to d. For example, in 2D there are 6 monomials of degree up to 2:

$$\mu(x_1,x_2) = \beta_1 1 + \beta_2 x_1 + \beta_3 x_2 + \beta_4 x_1 x_2 + \beta_5 x_1^2 + \beta_6 x_2^2$$

The choice of the degree d determines the size of the polynomial matrix

$$\F = \begin{bmatrix} f_1(\x_1) & f_2(\x_1) & \cdots & f_{N_d}(\x_1) \\\ f_1(\x_2) & f_2(\x_2) & \cdots & f_{N_d}(\x_2) \\\ \vdots & \vdots & \ddots & \vdots \\\ f_1(\x_n) & f_2(\x_n) & \cdots & f_{N_d}(\x_n) \end{bmatrix}$$

and polynomial vector \f = \begin{bmatrix} f_1(\x_0) & f_2(\x_0) & \cdots & f_{N_d}(\x_0) \end{bmatrix}^\top.

The variogram determines the variogram matrix:

$$\G = \begin{bmatrix} \gamma(\x_1,\x_1) & \gamma(\x_1,\x_2) & \cdots & \gamma(\x_1,\x_n) \\\ \gamma(\x_2,\x_1) & \gamma(\x_2,\x_2) & \cdots & \gamma(\x_2,\x_n) \\\ \vdots & \vdots & \ddots & \vdots \\\ \gamma(\x_n,\x_1) & \gamma(\x_n,\x_2) & \cdots & \gamma(\x_n,\x_n) \end{bmatrix}$$

and the variogram vector \g = \begin{bmatrix} \gamma(\x_1,\x_0) & \gamma(\x_2,\x_0) & \cdots & \gamma(\x_n,\x_0) \end{bmatrix}^\top.

The resulting linear system is:

$$\begin{bmatrix} \G & \F \\\ \F^\top & \boldsymbol{0} \end{bmatrix} \begin{bmatrix} \l \\\ \boldsymbol{\nu} \end{bmatrix} = \begin{bmatrix} \g \\\ \f \end{bmatrix}$$

with \boldsymbol{\nu} the Lagrange multipliers associated with the universal constraints. The mean and variance at location \x_0 are given by:

$$\mu(\x_0) = \z^\top \l$$ $$\sigma^2(\x_0) = \begin{bmatrix}\g \\ \f\end{bmatrix}^\top \begin{bmatrix}\l \\ \boldsymbol{\nu}\end{bmatrix}$$
GeoStatsModels.UniversalKriging

External Drift Kriging

In External Drift Kriging, the mean of the random field is assumed to be a combination of known smooth functions:

$$\mu(\x) = \sum_k \beta_k m_k(\x)$$

Differently than Universal Kriging, the functions m_k are not necessarily polynomials of the spatial coordinates. In practice, they represent a list of variables that is strongly correlated (and co-located) with the variable being estimated.

External drifts are known to cause numerical instability. Give preference to other Kriging variants if possible.

GeoStatsModels.ExternalDriftKriging