TurningBands ¶
Turning-bands simulation conditioned by kriging; same conventions as SGS, trend and domains included.
With domains at fit, each domain is transformed on its own, as in
SGS, and every domain shares the bands of a realization. A node is
conditioned by kriging the residuals of the data of its domain, and of
other domains within Search.soft, each of those as its grade (and trend)
transformed through the node's domain; the node is back-transformed
through its domain's transform.
fit
method descriptor
¶
fit(
coords,
values,
*,
weights=None,
holes=None,
trend=None,
domains=None,
domain_column=None,
)
Takes the conditioning data. Samples sharing a location keep the
first, with a warning naming their holes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
coords
|
(array_like, shape(n, 2) or (n, 3), PointSet or BlockModel)
|
|
required |
values
|
array_like, shape (n,), or str
|
Values, or the column of |
required |
weights
|
array_like or str
|
Declustering weights, for every normal score. |
None
|
holes
|
array_like or str
|
Drill-hole ids or names, for |
None
|
trend
|
array_like or str
|
Trend at the data, from any model or estimator; |
None
|
domains
|
array_like or label
|
Domain label of each sample, or one label for all: strings, numbers or booleans. Samples sharing a location in different domains are all kept. |
None
|
domain_column
|
str
|
The column of |
None
|
Raises:
| Type | Description |
|---|---|
InvalidInput
|
If a Search.soft names a domain without samples, or has no
|
from_parquet
staticmethod
¶
from_parquet(path)
Reads to_parquet output; raises InvalidInput on another class's file
or a newer format.
simulate
method descriptor
¶
simulate(
targets,
*,
n=100,
seed=0,
cutoffs=None,
quantiles=Ellipsis,
tolerances=Ellipsis,
keep=None,
blocks=None,
window=None,
groups=None,
trend=None,
domains=None,
domain_column=None,
grade_tonnage_cutoffs=None,
density=None,
tonnage=None,
categories=None,
)
Summary of n realizations; same options as SGS.simulate.
domains, needed when fitted with them, labels the targets, or is one
label for all; a target in a domain without samples raises
InvalidInput. Simulated domains, an (n, targets) array, give
realization k of the grades the domains of row k;
domain_column as in SGS.simulate.
simulate_to_parquet
method descriptor
¶
simulate_to_parquet(
path,
out,
*,
n=100,
seed=0,
cutoffs=None,
quantiles=Ellipsis,
keep=None,
rows=1000000,
domains=None,
domain_column=None,
trend=None,
discretization=None,
)
Summary of n realizations over the block model file path, written
to out chunk by chunk with the input columns: mean, variance,
p_above_<c> and mean_above_<c> per cutoff, q<p> per quantile, and
realization_<k> for each realization kept with keep.
The same values as simulate on the whole model, in memory bounded by
rows blocks plus the bands. Returns each realization's global
realization_mean and (n, cutoffs) realization_above.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
keep
|
bool or sequence of int
|
Realizations written beside the summary as |
False
|
domains
|
array_like or label
|
Needed when fitted with them: labels of the blocks in file order, or one label for all. |
None
|
domain_column
|
str
|
Instead of |
None
|
trend
|
str
|
Needed when fitted with a trend: the column of |
None
|
discretization
|
tuple of int
|
Nodes per axis simulated in each block and averaged by volume, as
|
None
|
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.
used in