SpatialEstimate

SpatialEstimate[{loc1val1,loc2val2,}]

creates a spatial prediction from values vali given at locations loci.

SpatialEstimate[{loc1,loc2,}{val1,val2,}]

generates the same result.

Details

  • SpatialEstimate is also known as kriging and geospatial prediction.
  • SpatialEstimate returns a SpatialEstimatorFunction and is typically used to predict the value for locations other than loci. The values include things like elevation, concentrations, temperatures, etc.
  • SpatialEstimate works by identifying a global trend model and a local variation model.
  • The local variations part is defined to minimize the expected prediction error where is the true value and and is the predicted value.
  • There are two parts to the local variations. The VariogramFunction describes how much the value at a location is affected by nearby values, and the SpatialNoiseLevel describes how much noise there is in measurements of the values.
  • With zero noise variance, the predictor function will interpolate through the given values. With nonzero noise variance, the predictor function will approximate the given values but not interpolate and effectively smooth out the surface. The SpatialNoiseLevel effectively gives a way to control the level of smoothing in the resulting SpatialEstimatorFunction.
  • The locations loci can have the forms:
  • {p1,,pd}geometrical locations
    GeoPosition[],GeoPositionENU[],geographical locations
  • The values vali can have the forms:
  • ciscalar value
    Quantity[ci,"unit"]scalar quantity
    {vi,1,,vi,m}vector value or quantity
  • Vector values vali are treated as having independent components.
  • The following options can be given:
  • SpatialTrendFunctionAutomaticglobal trend model
    VariogramFunctionAutomaticlocal variation model
    SpatialNoiseLevelAutomaticnoise level in vali

Examples

open allclose all

Basic Examples  (3)

SpatialEstimate computes a continuous function for sparse values given with locations:

Compute estimated value at a location:

Plot the estimated surface:

Create a continuous spatial estimator function to visualize density:

Create spatial estimator function with constant trend:

Visualize spatial estimator function in the observation region inferred from the locations:

Rainfall amounts at locations in Switzerland:

Create spatial estimator function with linear trend:

Evaluate spatial estimator function at uniform random locations in the observation region:

Scope  (3)

Create spatial estimator for random data:

Define a variogram model to use:

Create spatial estimator function with the variogram model and quadratic trend:

For large datasets, SpatialEstimate is performed on local neighborhoods:

Extract locations and values from the elevation data:

Compute spatial estimator function with quadratic trend:

Create random locations to illustrate the estimated values:

Using all the data points is much slower

Use SpatialEstimate with specified variogram function:

Create spatial estimator function with linear trend:

Find the variogram model used:

Fit another variogram model:

Compute the estimator functions with the fitted variogram model:

Compare the estimator surfaces of the two variogram models:

Options  (3)

SpatialNoiseLevel  (1)

Specify noise level using SpatialNoiseLevel:

Create spatial estimator function with positive noise level:

If the noise level is 0, SpatialEstimate interpolates exactly:

SpatialTrendFunction  (1)

Specify trend function using SpatialTrendFunction:

Create spatial estimator function with constant trend:

Create spatial estimator function with quadratic trend:

VariogramFunction  (1)

Specify variogram model using VariogramFunction:

Create spatial estimator function with an exponential variogram model:

Use pre-fitted VariogramModel:

Applications  (3)

Often spatial data is given on a regular grid with missing regions, for example, in satellite ozone readings:


Create a continuous spatial estimator:

Find the estimated ozone value for a specific location:

Evaluate the spatial estimator function at uniform random locations in the observation region:

Visualize:

Use SpatialEstimate to create a continuous estimate from sparse observation locations:

Visualize data:

Compute estimates using specific models:

Create a set of random points and compute the estimated values at these locations:

Visualize rainfall values over the whole region:

SpatialEstimate can create a smoother picture of the data:

Standard ways to visualize the data:

Spatial estimate with smoothing:

Compute estimates for random locations:

Compute an estimate of the yield of the entire field:

Properties & Relations  (2)

For large spatial noise levels, the spatial estimator converges to the trend function:

Compute SpatialEstimate for increasing values of noise level for specified polynomial trend order:

Visualize:

Only with zero SpatialNoiseLevel is SpatialEstimate an exact interpolator:

Compute spatial estimate for varying values of spatial noise level:

Visualize the estimates with the data:

Possible Issues  (1)

Some variograms can be badly conditioned:

The result does not represent the data well:

Allowing positive SpatialNoiseLevel acts as a regularization:

The noise level is computed automatically:

Neat Examples  (1)

The population data of countries in Europe:

Find estimator surface with an exponential variogram model and two different trend models:

Wolfram Research (2021), SpatialEstimate, Wolfram Language function, https://reference.wolfram.com/language/ref/SpatialEstimate.html.

Text

Wolfram Research (2021), SpatialEstimate, Wolfram Language function, https://reference.wolfram.com/language/ref/SpatialEstimate.html.

CMS

Wolfram Language. 2021. "SpatialEstimate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SpatialEstimate.html.

APA

Wolfram Language. (2021). SpatialEstimate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SpatialEstimate.html

BibTeX

@misc{reference.wolfram_2022_spatialestimate, author="Wolfram Research", title="{SpatialEstimate}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/SpatialEstimate.html}", note=[Accessed: 03-July-2022 ]}

BibLaTeX

@online{reference.wolfram_2022_spatialestimate, organization={Wolfram Research}, title={SpatialEstimate}, year={2021}, url={https://reference.wolfram.com/language/ref/SpatialEstimate.html}, note=[Accessed: 03-July-2022 ]}