py3dinterpolations.modelling.models.idw.IDW

class py3dinterpolations.modelling.models.idw.IDW(x: ndarray, y: ndarray, z: ndarray, values: ndarray, power: float = 1)

Bases: DeterministicModel

Simple IDW Model object

IDW: Inverse Distance Weigthting

Offers tweaking of the power parameter of the IDW model.

Could be really slow for large datasets, due to the use of loops.

TODO: Remove loopings use a vectorized approach

Parameters
  • x (np.ndarray) – x coordinates of the points where the model will be evaluated

  • y (np.ndarray) – y coordinates of the points where the model will be evaluated

  • z (np.ndarray) – z coordinates of the points where the model will be evaluated

  • values (np.ndarray) – values of the points where the model will be evaluated

  • power (float) – power of the IDW model

power

power of the IDW model

Type

float

distance_matrix

distance matrix between observations and data points

Type

np.ndarray

Methods

__init__(x, y, z, values[, power])

compute(gridx, gridy, gridz)

compute the model

compute(gridx: ndarray, gridy: ndarray, gridz: ndarray) ndarray

compute the model

This method should be implemented in the child classes