SimulationSummary ¶
Uncertainty at every target from n realizations of a continuous
variable. Per-cutoff and per-quantile arrays have one row per target and
one column per cutoff or quantile.
mean_above
property
¶
mean_above
(targets, cutoffs) mean of the values above each cutoff; NaN where
no realization is above it.
precision
property
¶
precision
(targets, tolerances) fraction of realizations within r * |mean|
of the mean, P(|Z - mean| <= r |mean|), for each tolerance r
of simulate(tolerances=). With r = 0.15, a row whose precision
reaches 0.9 meets the common ±15 % at 90 % confidence criterion for
measured resources. NaN where the mean is 0 or NaN.
probability_above
property
¶
probability_above
(targets, cutoffs) fraction of realizations above each cutoff.
realization_above
property
¶
realization_above
(n, cutoffs) fraction of targets above each cutoff in each realization.
realizations
property
¶
realizations
(len(kept), targets) kept realizations; None when none were kept.
from_parquet
staticmethod
¶
from_parquet(path)
Reads to_parquet output; raises InvalidInput on another class's file
or a newer format.
grade_tonnage
method descriptor
¶
grade_tonnage(*, probabilities=Ellipsis)
Grade–tonnage curves across realizations, from a simulate run with
grade_tonnage_cutoffs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
probabilities
|
sequence of float
|
|
(0.1, 0.5, 0.9)
|
Returns:
| Type | Description |
|---|---|
Table
|
|
relative_error
method descriptor
¶
relative_error(*, confidence=0.9, center='mean')
Relative error per target: half the central confidence interval
over its center, (q_hi - q_lo) / (2 * center).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
confidence
|
float
|
Probability within the interval; 0.9 reads the 0.05 and 0.95
quantiles, which |
0.9
|
center
|
(mean, median)
|
The median needs the 0.5 quantile too. |
"mean"
|
Returns:
| Type | Description |
|---|---|
ndarray
|
NaN where the center is 0. |
to_parquet
method descriptor
¶
to_parquet(path)
Writes arrays as Parquet columns and parameters as JSON in the file
metadata; from_parquet reads it back.
validate
method descriptor
¶
validate(
truth,
*,
data=None,
confidence=0.9,
cutoff=None,
probability=0.5,
)
Checks the summary against a known truth, such as a reference realization the data were sampled from.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
truth
|
array_like or str
|
True value of each summary row, or the column of |
required |
data
|
PointSet or BlockModel
|
Container whose column |
None
|
confidence
|
float
|
Confidence of the maximum expected error (MEE, after Koppe),
|
0.9
|
cutoff
|
float
|
Classifies each row as ore where the probability above |
None
|
probability
|
float
|
Probability above |
0.5
|
Returns:
| Type | Description |
|---|---|
Table
|
|
Raises:
| Type | Description |
|---|---|
InvalidInput
|
If the quantiles or the cutoff were not requested, or |