Skip to content

compare builtin

compare(estimate, truth, *, data=None)

Mean distance from each target to its n nearest drill holes, each hole at its nearest sample, for classification by drill spacing.

Parameters:

Name Type Description Default
targets (array_like, PointSet or BlockModel)

Locations to measure from.

required
coords array_like

Sample coordinates, (n, 2) or (n, 3).

required
holes array_like or str

Hole id of each sample, or the column of coords holding them; samples of one hole count once.

required
n int or sequence of int

Number of holes averaged; one per class.

required
search Search

Its ellipsoid sets the distance (meters along the major axis), and samples beyond its radius are ignored. Isotropic and unbounded if omitted.

required
domains tuple of array_like

(target_domains, sample_domains): each target only sees samples of its own domain.

required
domain_column str or tuple of str

The column of targets and coords holding their domains, or one name for each; instead of domains.

required

Returns:

Type Description
ndarray

Distances, inf where fewer than n holes are in reach; shape (targets, len(n)) when n is a sequence.

How well `estimate` matches `truth`, e.g. an estimate against an
exhaustive grid; pairs with a missing value on either side are skipped.

Parameters:

Name Type Description Default
estimate array_like or str

One value per row, or column names of data.

required
truth array_like or str

One value per row, or column names of data.

required
data container

Holds the columns estimate and truth name.

None

Returns:

Type Description
dict

n pairs compared, mean_error and rmse of estimate − truth, correlation, and slope of the regression of truth on estimate.

used in