CategoricalIndicatorKriging ¶
Indicator kriging of categories: the probability of each category kriged from its indicator, clipped to [0, 1] and rescaled to sum 1 at each target.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variograms
|
Variogram or sequence of Variogram
|
One indicator variogram per category, in code order, or a single one shared by all (one kriging system per target). |
required |
search
|
Search or sequence of Search
|
Neighborhood shared by all categories; a sequence is searched in passes, each filling the targets the previous left unestimated. With no ellipsoid, the middle category's variogram orients it. |
required |
simple
|
bool
|
Simple kriging with the declustered global proportions as means; ordinary kriging otherwise. |
required |
scheme
|
Categories
|
Names and colors of the categories: |
required |
cross_validate
method descriptor
¶
cross_validate(*, folds=None)
Re-estimates each sample's probabilities from the others, through the same search passes, each in its own domain, against the proportions 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 |
|---|---|
CategoricalCrossValidation
|
|
fit
method descriptor
¶
fit(
coords,
categories,
*,
weights=None,
holes=None,
domains=None,
domain_column=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 |
categories
|
array_like or str
|
A category per sample: a label of |
required |
weights
|
array_like or str
|
Declustering weights for the global proportions: the simple kriging means. |
None
|
holes
|
array_like or str
|
Drill-hole ids or names, for |
None
|
domains
|
array_like
|
Domain label of each sample. A target is then estimated from the
samples of its own domain, plus those of other domains within
|
None
|
domain_column
|
str
|
The column of |
None
|
from_parquet
staticmethod
¶
from_parquet(path)
Reads to_parquet output; raises InvalidInput on another class's file
or a newer format.
predict
method descriptor
¶
predict(
targets,
*,
domains=None,
domain_column=None,
anisotropy=None,
diagnostics=False,
)
Probability of each category at each target.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
targets
|
(array_like, PointSet or BlockModel)
|
|
required |
domains
|
array_like
|
Domain label of each target, or one label for all; a domain without samples is left unestimated. |
None
|
domain_column
|
str
|
The column of |
None
|
anisotropy
|
LocalAnisotropy
|
Orients every category's variogram and the search at each target. |
None
|
diagnostics
|
bool
|
Fill |
False
|
Returns:
| Type | Description |
|---|---|
CategoricalIndicatorSummary
|
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