IndicatorKriging ¶
IndicatorKriging(
variogram: Variogram,
search: Search | Sequence[Search],
threshold: float | str,
)
Ordinary kriging of the indicator value <= threshold; estimates are probabilities.
threshold is in the unit of the values, or text such as "1 g/t" converted to it at fit.
unit
property
¶
unit
Unit of the estimates: that of the fitted values, ratio for probabilities; None if unknown.
cross_validate ¶
cross_validate(
*, folds: int | None = None
) -> CrossValidation
Re-estimates every sample from the others, through the same search passes.
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
|
from_parquet
classmethod
¶
from_parquet(path)
Reads to_parquet output; predictions match the saved estimator's bit for bit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str or PathLike
|
|
required |
Raises:
| Type | Description |
|---|---|
InvalidInput
|
If the file holds another class or a newer format. |
predict ¶
predict(
targets,
*,
return_variance: bool = False,
anisotropy=None,
diagnostics: bool = False,
domains=None,
domain_column=None,
)
Estimates at targets; NaN where the search found too few samples.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
targets
|
(array_like, PointSet or BlockModel)
|
|
required |
return_variance
|
bool
|
Also return the kriging variance. |
False
|
anisotropy
|
LocalAnisotropy
|
Orients each target's variogram and search. |
None
|
diagnostics
|
bool
|
Return a Table instead: |
False
|
domains
|
array_like or label
|
Domain label of each target, or one label for all of them; required when fitted with domains. Targets of a domain without samples stay NaN. |
None
|
domain_column
|
str
|
The column of |
None
|
Returns:
| Type | Description |
|---|---|
ndarray, tuple of ndarray or Table
|
Estimates in |
to_parquet ¶
to_parquet(path) -> None
Writes the samples as Parquet columns and the parameters as JSON in the file metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str or PathLike
|
|
required |
with_search ¶
with_search(search: Search | Sequence[Search])
A copy of the estimator, fitted samples included, with search in place of its searches.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
search
|
Search or sequence of Search
|
One search, or passes: targets one leaves unestimated go to the next. |
required |
used in