Skip to content

validate_model builtin

validate_model(
    model,
    grade,
    data,
    values,
    *,
    weights=None,
    domain_column=None,
    density=None,
    reference=None,
)

Statistics of a block model against the data it was estimated from, per domain and over all.

Parameters:

Name Type Description Default
model BlockModel

The blocks; weighted by their tonnage, volume × density.

required
grade str or array_like

Column of model holding the block grades, or the grades; NaN is skipped.

required
data (PointSet, Table or dict)

The samples (composites).

required
values str or array_like

Column of data holding the sample grades, or the grades; NaN is skipped.

required
weights array_like or str

Declustering weights of data; adds a declustered row that the model is compared with.

None
domain_column str or tuple of str

Domain column of both model and data, or one name for each.

None
density (float, array_like or str)

Block densities, or their column; default 1.

None
reference str or array_like

Other grades on the same blocks, e.g. the truth or a previous model.

None

Returns:

Type Description
Table

One row per domain (sorted, then "all") and source (naive and declustered data, model, reference): n, tonnage (null for data), mean, variance, cv, P10, P50, P90, mean_diff (mean / data mean - 1) and variance_ratio (variance / data variance), against the declustered data when weights are given.

used in