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)
|
|
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 |
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 |
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 |
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 |
required |
panels
|
BlockModel
|
|
required |
variance_factor
|
float or Variogram
|
|
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
|
|
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 |
None
|
quantiles
|
sequence of float
|
Probabilities in [0, 1], for |
Ellipsis
|
anisotropy
|
LocalAnisotropy
|
Orients every threshold's variogram and the search at each target. |
None
|
diagnostics
|
bool
|
Fill |
False
|
discretization
|
tuple of int
|
Points per axis of each block of a BlockModel |
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