xoa.krig.ClusteredKriger

xoa.krig.ClusteredKriger#

class xoa.krig.ClusteredKriger(da, krigtype, variogram_func, npmax=None, nproc=None, seed=None, **kwargs)[source]#

Kriger that supports clusterization to limit memory

Big input cloud of points (size > npmax) are split into smaller clusters using cluster analysis of distance with function clusterize().

The problem is solved in this way:

  1. Input points are split in clusters if necessary.

  2. The input variogram matrix is factorized for each cluster, possibly using multiprocessing if nproc>1.

  3. Values are computed at output positions each using the factorized matrix of cluster.

  4. Final value is a weighted average of the values estimated using each cluster. Weights are inversely proportional to the squared error.

  5. The final error is the same weighted average of the errors, which is conservative since the errors of the clusters are correlated.

Parameters:
  • npmax (optional) – Maximal number of points to be used simultaneously for kriging. When the number of input points is greater than this value, clusterization is applied.

  • nproc (optional) – Number of processes to use to factorize matrices. Set it to a number <2 to switch off parallelisation.

  • seed (int, None) – Seed of the random initialisation of the clusters, to get reproducible results. The clusters, hence the result, change slightly from one call to another without it.

See also

Kriger

__init__(da, krigtype, variogram_func, npmax=None, nproc=None, seed=None, **kwargs)[source]#

Methods

get_A(cloud)

Get the variogram matrix of a cloud of points

interp(dso[, block, name])

Interpolate to the dso positions

Attributes

clusters

dist_units

Distance units

nclust

Number of clusters

npmax

Max number of points per cluster

sill

Sill of the variogram, used to convert it to a covariance for the simple kriging

solvers

Get the solver of the A matrix of each cluster

variogram_func

Variogram function or callable, like a VariogramModel instance