Empirical transiograms

Transiograms of categorical variables are matrix-valued functions $t_{ab}(h)$ that measure the transition probability from categorical value $a$ to categorical value $b$ at a given lag $h \in \R$. They are often used for the simulation of Markov processes in more than one dimension.

The Carle's estimator of the empirical transiogram is given by

\[\widehat{t_{ab}}(h) = \frac{\sum_{(i,j) \in N(h)} {I_a}_i \cdot {I_b}_j}{\sum_{(i,j) \in N(h)} {I_a}_i}\]

where $N(h) = \left\{(i,j) \mid ||\x_i - \x_j|| = h\right\}$ is the set of pairs of locations at a distance $h$, and where $I_a$ and $I_b$ are the indicator variables for categorical values (or levels) $a$ and $b$, respectively.

Transiograms can be plotted with the following options:

GeoStatsFunctions.transioplotFunction
transioplot(t; [options])

Plot the transiogram t with given options.

Common transiogram options:

  • color - color of transiogram
  • size - size of transiogram
  • maxlag - maximum lag of variogram
  • levels - categorical levels

Notes

  • This function will only work in the presence of a Makie.jl backend via package extensions in Julia v1.9 or later versions of the language.
source

(Omini)directional

GeoStatsFunctions.EmpiricalTransiogramType
EmpiricalTransiogram(data, var; [parameters])

Computes the empirical (a.k.a. experimental) omnidirectional transiogram for categorical variable var stored in geospatial data.

Parameters

  • nlags - number of lags (default to 20)
  • maxlag - maximum lag in length units (default to 1/2 of minimum side of bounding box)
  • distance - custom distance function (default to Euclidean distance)
  • algorithm - accumulation algorithm (default to :ball)

Available algorithms:

  • :full - loop over all pairs of points in the data
  • :ball - loop over all points inside maximum lag ball

All implemented algorithms produce the exact same result. The :ball algorithm is considerably faster when the maximum lag is much smaller than the bounding box of the domain of the data.

See also: DirectionalTransiogram, PlanarTransiogram.

References

source
GeoStatsFunctions.DirectionalTransiogramFunction
DirectionalTransiogram(direction, data, var; dtol=1e-6u"m", [parameters])

Computes the empirical transiogram for the categorical variable var stored in geospatial data along a given direction with band tolerance dtol in length units.

Optionally, forward parameters for the underlying EmpiricalTransiogram.

source
GeoStatsFunctions.PlanarTransiogramFunction
PlanarTransiogram(normal, data, var; ntol=1e-6u"m", [parameters])

Computes the empirical transiogram for the categorical variable var stored in geospatial data along a plane perpendicular to a normal direction with plane tolerance ntol in length units.

Optionally, forward parameters for the underlying EmpiricalTransiogram.

source

Consider the following categorical image:

using GeoStatsImages

img = geostatsimage("Gaussian30x10")

Z = [z < 0 ? 1 : 2 for z in img.Z]

cat = georef((; Z=Z), img.geometry)

cat |> viewer
Example block output

We can estimate the ominidirectional transiogram with

t = EmpiricalTransiogram(cat, :Z, maxlag = 50.)

transioplot(t)
Example block output

Transioplanes

Transiograms estimated along all directions in a given plane of reference are called transioplanes.

GeoStatsFunctions.EmpiricalTransioplaneType
EmpiricalTransioplane(data, var;
                      normal=Vec(0,0,1), nangs=50,
                      ptol=0.5u"m", dtol=0.5u"m",
                      [parameters])

Given a normal direction, estimate the transiogram of variable var along all directions in the corresponding plane of variation.

Optionally, specify the tolerance ptol in length units for the plane partition, the tolerance dtol in length units for the direction partition, the number of angles nangs in the plane, and forward the parameters to the underlying EmpiricalTransiogram.

source

The transioplane is plotted on a polar axis for all lags and angles:

t = EmpiricalTransioplane(cat, :Z, maxlag = 50.)

planeplot(t)
Example block output