Skip to content

experimental_variogram builtin

experimental_variogram(
    coords,
    values,
    lag,
    max_lag,
    *,
    azimuth=None,
    dip=0.0,
    tolerance=22.5,
    bandwidth=None,
    estimator="matheron",
    standardize=False,
    other=None,
    other_coords=None,
    holes=None,
    method=None,
    anisotropy=None,
)

Experimental variogram, omnidirectional unless azimuth is given, or the cross-variogram of values and other.

Every estimator is returned in variogram form, so any of them can be fitted.

Parameters:

Name Type Description Default
coords (array_like, shape(n, 2) or (n, 3), PointSet or BlockModel)
required
values array_like, shape (n,), or str

Values, or the column of coords holding them; so are other (of other_coords when given) and holes.

required
lag float or str

Lag-bin width and largest pair distance, in the length unit of coords or as text such as "10 m".

required
max_lag float or str

Lag-bin width and largest pair distance, in the length unit of coords or as text such as "10 m".

required
azimuth float

Direction and cone half-angle in degrees; omnidirectional when azimuth is None.

None
dip float

Direction and cone half-angle in degrees; omnidirectional when azimuth is None.

None
tolerance float

Direction and cone half-angle in degrees; omnidirectional when azimuth is None.

None
bandwidth float

Largest offset of a pair from the direction line.

None
estimator (matheron, cressie - hawkins, covariance, correlogram, pairwise - relative, madogram)

Classical, robust, σ² − C(h), 1 − ρ(h), the pairwise-relative variogram (non-negative values only), or the madogram Σ |Δz| / 2N, in the units of the values: √(γ/π) for Gaussian increments and less sensitive than γ to a few extreme pairs (see dissemination).

"matheron"
standardize bool

Divide by the sample variance so the sill is 1, the madogram by the standard deviation. The correlogram and pairwise-relative estimates are dimensionless and left unchanged; a cross-variogram is divided by σ₁σ₂.

False
other (array_like, shape(m))

Second variable, for its cross-variogram with values: "matheron" gives γ₁₂(h) = Σ Δz₁·Δz₂ / 2N, "covariance" gives C₁₂(0) − C₁₂(h) with C₁₂(h) in covariances. C₁₂(h) pairs values at the tail with other at the head, so the directional cone is one-sided: reversing azimuth estimates C₂₁(h); omnidirectional averages both.

None
other_coords (array_like, shape(m, 2) or (m, 3))

Where other is sampled when not at coords. Only the cross-covariance is defined then, with C₁₂(0) estimated from the pairs closer than half a lag.

None
holes (array_like, shape(n))

Hole id of each sample, for a downhole variogram: only pairs in the same hole count, lag k gathers the pairs within lag / 2 of k * lag and reports their mean distance. With azimuth, only the pairs inside the direction cone count, e.g. the flat stretches of bent holes. Not with other.

None
method (None, pairs, grid)

How pairs are found. "pairs" compares every two samples, O(n²). "grid" needs a regular or masked BlockModel: every pair of cells one index offset apart has the same separation, so each offset within max_lag and the direction cone is binned once and its pairs are gathered by shifting cell indices, O(n x offsets), with the same pairs and estimates as "pairs" up to round-off; offsets exactly on a lag or cone boundary are decided once, where round-off can split their pairs in the search. None takes "grid" for such a BlockModel without holes or other_coords, else "pairs".

None
anisotropy LocalAnisotropy

Local frames: each pair's separation is read in the frame of the nearest location to its tail, and azimuth and dip are relative to it (azimuth 0 the local major axis, 90 the semi-major, dip 90 the minor), so the cone follows a folded or rotating continuity. Pairs come from "pairs"; not with other or holes.

None

Returns:

Type Description
ExperimentalVariogram

used in