Skip to content

MultipleIndicatorKriging

Multiple indicator kriging: P(value <= t) kriged at every threshold, corrected for order relations, completed within classes and in the tails, and summarized at each target.

Parameters:

Name Type Description Default
variogram Variogram or sequence of Variogram

One indicator variogram per threshold, or a single one shared by all (median indicator kriging: one kriging system per target).

required
search Search or sequence of Search

Neighborhood shared by all thresholds; a sequence is searched in passes, each filling the targets the previous left unestimated. With no ellipsoid, the median threshold's variogram orients it.

required
thresholds sequence of float

Strictly increasing, in data units.

required
simple bool

Simple kriging with the declustered global proportions as means; ordinary kriging otherwise.

required
tails tuple of float

Lower and upper bounds of the distribution, widened to cover the data and thresholds; the data minimum and maximum by default.

required
interpolation ('global', linear)

Within each class, follow the declustered data in it ("global", uniform where a class holds none) or be uniform ("linear").

"global"
upper_tail tuple of (str, float)

("power", w) or ("hyperbolic", w) for the class above the last threshold, up to the upper tail bound; the hyperbolic model needs a last threshold > 0.

required

cross_validate method descriptor

cross_validate(*, folds=None)

Re-estimates each sample's distribution from the others, through the same search passes, against the global distribution of all samples.

Parameters:

Name Type Description Default
folds int

Leave-one-out when None; otherwise k-fold, each sample estimated without the samples of its fold. Samples fitted with holes keep their holes whole: the j-th of the sorted hole ids goes to fold j % folds, an untagged sample i to fold i % folds.

None

Returns:

Type Description
IndicatorCrossValidation

fit method descriptor

fit(coords, values, *, weights=None, holes=None)

Stores the samples. Samples sharing a location keep the first one, with a warning naming their holes.

Parameters:

Name Type Description Default
coords (array_like, PointSet or BlockModel)
required
values array_like or str

A value per sample, or the column of coords holding them; so for weights and holes.

required
weights array_like or str

Declustering weights for the global distribution: the simple kriging means, the class contents and the tails.

None
holes array_like or str

Drill-hole ids or names, for max_per_hole.

None

from_parquet staticmethod

from_parquet(path)

Reads to_parquet output; raises InvalidInput on another class's file or a newer format.

localize method descriptor

localize(
    smus,
    ranking,
    panels,
    *,
    variance_factor=None,
    name="localized",
    discretization=None,
)

Localized grades of the selective blocks nested in the panels.

Each panel's point-support conditional distribution, kriged at its centroid or over the panel, takes an affine change of support to the selective blocks, m + sqrt(f) * (z - m) about its mean m. A panel holding n blocks splits that distribution into n equal-probability bands, and its block ranked i gets the mean of band i: the blocks average to the panel's E-type estimate and reproduce its selective-block grade-tonnage curve at tonnages k / n. Partial panels localize over the blocks present.

Parameters:

Name Type Description Default
smus BlockModel

Selective blocks nesting in the panels: same rotation, sizes dividing the panel sizes, grids aligned; not sub-blocked.

required
ranking str

Column of smus ordering the blocks within a panel, such as a direct kriging of the blocks; ties follow row order.

required
panels BlockModel
required
variance_factor float or Variogram

f, the variance of the blocks within a panel over that of the points within it, in [0, 1]; or a variogram to compute it from, (C(v, v) - C(V, V)) / (C(0) - C(V, V)) with the nugget left out of the block averages. The median threshold's variogram by default.

None
name str

Name of the new column.

"localized"
discretization tuple of int

Points per axis of each panel to krige the indicators over; at the centroid by default.

None

Returns:

Type Description
BlockModel

smus with the localized grades; null in panels the search leaves unestimated and outside every panel.

Raises:

Type Description
InvalidInput

If the blocks do not nest, or a block of an estimated panel has a null rank.

predict method descriptor

predict(
    targets,
    *,
    cutoffs=None,
    quantiles=Ellipsis,
    anisotropy=None,
    diagnostics=False,
    discretization=None,
)

Conditional distribution at each target.

Parameters:

Name Type Description Default
targets (array_like, PointSet or BlockModel)
required
cutoffs sequence of float

For probability_above and mean_above.

None
quantiles sequence of float

Probabilities in [0, 1], for quantile_values.

Ellipsis
anisotropy LocalAnisotropy

Orients every threshold's variogram and the search at each target.

None
diagnostics bool

Fill IndicatorSummary.diagnostics.

False
discretization tuple of int

Points per axis of each block of a BlockModel targets: the indicators are kriged over the block, giving the distribution of the point values within it rather than at its centroid.

None

Returns:

Type Description
IndicatorSummary

NaN where the search found too few samples.

to_parquet method descriptor

to_parquet(path)

Writes samples and weights as Parquet columns and parameters as JSON in the file metadata; from_parquet reads it back.

used in