SIS ¶
Sequential indicator simulation of categories 0..k, one indicator
variogram per category.
fit
method descriptor
¶
fit(coords, categories, *, holes=None, proportions=None)
Takes the categories 0..k at coords. holes tag the samples for
max_per_hole; samples sharing a location keep the first, with a
warning naming their holes. Both may name columns of coords.
proportions, shape (n, k) (an array or a Table such as
combine_proportions returns), are local category proportions at the
samples; simulate then needs them at the targets, and krigs each
indicator minus its local proportion by simple kriging, so every node
is drawn towards its own proportions.
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,
keep=None,
anisotropy=None,
blocks=None,
proportions=None,
clean=None,
path=None,
batch=None,
memory=None,
)
Summary of n realizations, each seeded from seed and its index; the (n, targets)
realizations themselves only when keep.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
targets
|
(array_like, PointSet or BlockModel)
|
|
required |
n
|
int
|
Number of realizations. |
100
|
seed
|
int
|
Base RNG seed; realization |
0
|
keep
|
bool or sequence of int
|
Keep all realizations, or those indices, as an |
False
|
anisotropy
|
LocalAnisotropy
|
Orients each node's variograms and search. It runs on the random path. |
None
|
blocks
|
BlockModel
|
Coarser BlockModel: each block takes the category filling most of
its node volume, ties to the smallest, as in |
None
|
proportions
|
array_like or Table
|
Shape |
None
|
clean
|
int or sequence of int
|
Odd window side in nodes, or one per axis. Cleans each realization on a regular or masked BlockModel by maximum a-posteriori selection (Deutsch 1998): every node takes the category with the largest count in the window around it, nearer nodes weighing more, nodes on a datum keeping their category and weighing 5 times more, and each category scaled by its target proportion (the samples', or the local proportions) over its proportion in the realization. It removes short-scale noise and pulls proportions toward the target; a large window smooths more than the variograms imply. |
None
|
path
|
(shared, random)
|
"shared", one multigrid path for every realization on a regular or
masked BlockModel, so each node's neighbors and kriging weights are
found once for a batch of realizations, or "random", a new random
path per realization. The default is "shared" where it can run and
"random" otherwise (points, octant or sector searches, min_holes,
soft boundaries, |
"shared"
|
batch
|
int
|
On a shared path, the number of realizations simulated together, by
default as many as fit in |
None
|
memory
|
int or float
|
Bytes the run may take, at least 1; default 70 % of the memory
available now. It bounds the realizations simulated at once; a run
whose single realization does not fit raises InvalidInput.
Realizations do not depend on |
None
|
Returns:
| Type | Description |
|---|---|
CategoricalSummary
|
|
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