Skip to content

compare_models builtin

compare_models(
    model,
    columns,
    cutoffs,
    *,
    categories=None,
    reference=None,
    density=None,
)

Grade-tonnage of several models of the same blocks, by cutoff and category, against a reference model.

Each block stands for volume × density tonnes, as in grade_tonnage.

Parameters:

Name Type Description Default
model BlockModel

The blocks, with their volumes.

required
columns sequence of str or dict of str to array_like or str

Columns of model holding the grades of each model, or model names to columns or grades; NaN is skipped.

required
cutoffs array_like

Cutoff grades in the unit of the values, or texts such as "0.5 g/t"; -inf keeps everything.

required
categories array_like or str

Category (e.g. class or domain) of each block, int or str, or its column.

None
reference str

Model the others are compared with; the first by default.

None
density (float, array_like or str)

Block densities, or their column; default 1.

None

Returns:

Type Description
Table

One row per category (sorted, then "all"), cutoff and model: category, cutoff, model, tonnage, mean_grade and metal at or above the cutoff, and tonnage_diff, grade_diff and metal_diff, each value / reference value - 1.

used in