# Built-in

Below is the list of solvers that are readily available after loading the project.

## Estimation

`GeoEstimation.IDW`

— Type`IDW(var₁=>param₁, var₂=>param₂, ...)`

Inverse distance weighting estimation solver.

**Parameters**

`neighbors`

- Number of neighbors (default to all the data)`distance`

- A distance defined in Distances.jl (default to`Euclidean()`

)`power`

- Power of the distances (default to`1`

)

**References**

Shepard 1968. *A two-dimensional interpolation function for irregularly-spaced data.*

`GeoEstimation.LWR`

— Type`LWR(var₁=>param₁, var₂=>param₂, ...)`

Locally weighted regression estimation solver.

**Parameters**

`neighbors`

- Number of neighbors (default to all the data)`distance`

- A distance from Distances.jl (default to`Euclidean()`

)`weightfun`

- Weighting function (default to`exp(-3*h^2/2)`

)

**References**

- Stone 1977.
*Consistent non-parametric regression.* - Cleveland 1979.
*Robust locally weighted regression and smoothing scatterplots.* - Cleveland & Grosse 1991.
*Computational methods for local regression.*

`GeoEstimation.Kriging`

— Type`Kriging(var₁=>param₁, var₂=>param₂, ...)`

A polyalgorithm Kriging estimation solver.

Each pair `var=>param`

specifies the `KrigingParam`

`param`

for the Kriging variable `var`

. In order to avoid boilerplate code, the constructor expects pairs of `Symbol`

and `NamedTuple`

instead.

**Parameters**

`variogram`

- Variogram model (default to`GaussianVariogram()`

)`mean`

- Simple Kriging mean`degree`

- Universal Kriging degree`drifts`

- External Drift Kriging drift functions

Latter options override former options. For example, by specifying `drifts`

, the user is telling the algorithm to ignore `degree`

and `mean`

. If no option is specified, Ordinary Kriging is used by default with the `variogram`

only.

`minneighbors`

- Minimum number of neighbors (default to`1`

)`maxneighbors`

- Maximum number of neighbors (default to`nothing`

)`neighborhood`

- Search neighborhood (default to`nothing`

)`distance`

- Distance used to find nearest neighbors (default to`Euclidean()`

)

The `maxneighbors`

option can be used to perform approximate Kriging with a subset of data points per estimation location. If `maxneighbors`

is set to `nothing`

, global Kriging is performed. Two neighborhood search methods are available depending on the value of `neighborhood`

:

If a

`neighborhood`

is provided, local Kriging is performed by sliding the`neighborhood`

in the domain.If

`neighborhood`

is not provided, the Kriging system is built using`maxneighbors`

nearest neighbors according to a`distance`

.

**Examples**

Solve the variable `:var₁`

with Simple Kriging by specifying the `mean`

, and the variable `:var₂`

with Universal Kriging by specifying the `degree`

and the `variogram`

model.

```
julia> Kriging(
:var₁ => (mean=1.,),
:var₂ => (degree=1, variogram=SphericalVariogram(range=20.))
)
```

Solve all variables of the problem with the default parameters (i.e. Ordinary Kriging with unit Gaussian variogram):

`julia> Kriging()`

## Simulation

`GeoSimulation.LUGS`

— Type`LUGS(var₁=>param₁, var₂=>param₂, ...)`

LU Gaussian simulation.

**Parameters**

`variogram`

- Theoretical variogram (default to`GaussianVariogram()`

)`mean`

- Mean of unconditional simulation (default to`0`

)`mapping`

- Data mapping method (default to`NearestMapping()`

)`factorization`

- Factorization method (default to`cholesky`

)

**Joint parameters**

`correlation`

- correlation coefficient between two covariates (default to`0`

).

**Examples**

Simulate two variables `var₁`

and `var₂`

independently:

```
julia> LUGS(:var₁ => (variogram=SphericalVariogram(),mean=10.),
:var₂ => (variogram=GaussianVariogram(),))
```

Simulate two correlated variables `var₁`

and `var₂`

with correlation `0.7`

:

```
julia> LUGS(:var₁ => (variogram=SphericalVariogram(),mean=10.),
:var₂ => (variogram=GaussianVariogram(),),
(:var₁,:var₂) => (correlation=0.7,))
```

**References**

Alabert 1987. *The practice of fast conditional simulations through the LU decomposition of the covariance matrix.*

Oliver 2003. *Gaussian cosimulation: modeling of the cross-covariance.*

`GeoSimulation.FFTGS`

— Type`FFTGS(var₁=>param₁, var₂=>param₂, ...)`

FFT Gaussian simulation.

**Parameters**

`variogram`

- theoretical variogram (default to`GaussianVariogram()`

)`mean`

- mean of Gaussian field (default to`0`

)

**Global parameters**

`threads`

- number of threads in FFT (default to all physical cores)

**References**

Gutjahr 1997. *General joint conditional simulations using a fast Fourier transform method.*

`GeoSimulation.SGS`

— Type`SGS(var₁=>param₁, var₂=>param₂, ...)`

Sequential Gaussian simulation.

**Parameters**

`variogram`

- Variogram model (default to`GaussianVariogram()`

)`mean`

- Simple Kriging mean`degree`

- Universal Kriging degree`drifts`

- External Drift Kriging drift functions

Latter options override former options. For example, by specifying `drifts`

, the user is telling the algorithm to ignore `degree`

and `mean`

. If no option is specified, Ordinary Kriging is used by default with the `variogram`

only.

`neighborhood`

- Neighborhood on which to search neighbors`maxneighbors`

- Maximum number of neighbors (default to 10)`path`

- Simulation path (default to`LinearPath()`

)`mapping`

- Data mapping method (default to`NearestMapping()`

)

For each location in the simulation `path`

, a maximum number of neighbors `maxneighbors`

is used to fit a Gaussian distribution. The neighbors are searched according to a `neighborhood`

.

**References**

Gomez-Hernandez & Journel 1993. *Joint Sequential Simulation of MultiGaussian Fields*

`GeoSimulation.CookieCutter`

— Type`CookieCutter(master, others)`

A cookie-cutter simulation solver.

**Parameters**

`master`

- Master simulation solver (a.k.a. facies solver)`others`

- Solvers for each value of the master realization

**Examples**

Simulate lithofacies with image quilting and fill porosity values with LU Gaussian simulation:

```
julia> f = IQ(:facies => (TI=IMG, template=(30,30,1)))
julia> p₀ = LUGS(:poro => (variogram=SphericalVariogram(range=10.),))
julia> p₁ = LUGS(:poro => (variogram=SphericalVariogram(range=20.),))
julia> CookieCutter(f, Dict(0=>p₀, 1=>p₁))
```

## Learning

`GeoLearning.PointwiseLearn`

— Type`PointwiseLearn(model)`

A learning solver that converts geospatial data to a tabular format with features (and possibly labels) for each point, and then solves the problem with classical statistical learning `model`

.

**Parameters**

`model`

- Learning model implementing the`MLJModelInterface.jl`

.

**References**

- Hoffimann et al. 2020. Geostatistical Learning: Challenges and Opportunities