Skip to content

calibrate_search

calibrate_search(
    estimator,
    searches,
    targets,
    *,
    folds=None,
    weights=None,
    cutoffs=None,
    anamorphosis=None,
    cross_validation: bool = True,
    domains=None,
    domain_column=None,
    data=None,
) -> Table

Scores candidate searches for a fitted estimator, one row per scenario, to compare side by side.

Each scenario re-estimates targets through estimator.with_search, so method, variogram and samples stay fixed. Scenarios run one after the other, each in parallel over the targets. No scenario is picked: the scores trade smoothing against conditional bias, and the choice is the user's.

Parameters:

Name Type Description Default
estimator kriging estimator

Fitted, e.g. BlockKriging for blocks.

required
searches sequence

The scenarios: each a Search, or a sequence of them as passes.

required
targets (array_like, PointSet or BlockModel)

Where to estimate, usually the blocks.

required
folds int

Cross-validation folds; leave-one-out when None.

None
weights array_like or str

Declustering weights of the fitted samples, for the cross-validation scores and the global bias, or the column of data holding them.

None
cutoffs sequence of float

Cutoffs for tonnage and metal ratios against the discrete Gaussian block-support reference.

None
anamorphosis HermiteAnamorphosis

Fitted on the samples (declustered if they are clustered); required with cutoffs. Its change-of-support coefficient is solved so that the block variance relative to the point variance matches the variogram's, block_variance / sill.

None
cross_validation bool

Adds the cross-validation scores. It runs at point support with the same variogram and passes, so block kriging is cross-validated as ordinary kriging.

True
domains array_like or label

Domain label of each target, or one label for all of them, as in predict; required when the estimator was fitted with domains. Cross-validation and the global bias then cover the samples of those domains only.

None
domain_column str

The column of targets holding their domains; instead of domains.

None
data PointSet or Table

The fitted samples, when weights is a column name.

None

Returns:

Type Description
Table

scenario (index in searches); estimate_variance (variance of the estimates), block_variance (sill minus the mean variogram within a target, nugget excluded; the sill for point estimators), variance_ratio (their ratio), model_variance_ratio (mean Var(Z*) of the targets over the block variance, the ratio the model predicts); slope_mean, slope_p10, efficiency_mean, efficiency_p10 (slope of regression and kriging efficiency, mean and 10th percentile); negative_weight_sum (mean); estimated and first_pass (fractions of the targets estimated and filled by the first pass); cv_rmse, cv_mean_error (estimate minus actual) and cv_slope (of actual on estimate), declustered with weights; global_bias (mean estimate over the declustered data mean, minus 1); with cutoffs, tonnage_ratio_<cutoff> and metal_ratio_<cutoff> (estimated over reference proportion above the cutoff, and metal above it).

Raises:

Type Description
InvalidInput

If cutoffs come without an anamorphosis or a variogram, weights do not match the fitted samples, or a scenario estimates no target.

used in