Skip to content

domains builtin

domains(
    data,
    columns,
    k,
    *,
    method="consensus",
    neighbors=16,
    realizations=100,
    seed=0,
)

Domains of samples from ensemble spatial clustering of their values, after Martin and Boisvert (2018), doi:10.1016/j.cageo.2018.08.005.

The columns are standardized and every clustering is k-means. Each sample's features come from its spatial neighbors, so the domains follow the values and stay contiguous in space.

Parameters:

Name Type Description Default
data PointSet or Drillholes

Samples, e.g. composites, holding columns.

required
columns sequence of str

Numeric columns clustered; a sample with NaN in any gets no domain.

required
k int

Number of domains.

required
method (consensus, autocorrelation, dual)

"autocorrelation" clusters, for each column, the value and the mean of the neighbors nearest samples. "dual" clusters means over a dual-space neighborhood: of the nearest samples in space, those nearest in the columns. Both "dual" and "consensus" repeat the clustering realizations times with random neighborhood sizes and column subsets ("consensus" alternating the two clusterings), then cluster how often each pair of samples shares a cluster.

"consensus"
neighbors int

Spatial neighbors of a sample; realizations draw between half and twice as many. Also the neighborhood of the spatial entropy.

16
realizations int

Clusterings in the ensemble; unused by "autocorrelation".

100
seed int

Seed; the domains do not depend on the number of threads.

0

Returns:

Type Description
Domains

labels (codes 0 to k - 1 by increasing mean of the first column, NaN without a domain) for domains= or a column, scheme, agreement, wcss and spatial_entropy.

Used in