geolime.geostats.estimation.idw

Functions:

compute_weights_idw(dist, power)

Compute IDW weights

distance_matrix(x1, x2[, distance])

Computes the distance matrix of two sets of points in the Euclidean space according to a distance.

idw(points, coords, values[, power])

Inverse Distance Weighting algorithm.

geolime.geostats.estimation.idw.compute_weights_idw(dist: numpy.ndarray, power: float)

Compute IDW weights

Parameters
  • dist (np.ndarray) – Distances array

  • power (float) – Inversion power

Returns

Weights array

Return type

np.ndarray

geolime.geostats.estimation.idw.idw(points: numpy.ndarray, coords: numpy.ndarray, values: numpy.ndarray, power: int = 1)

Inverse Distance Weighting algorithm. Uses the measured values surrounding the prediction location to predict a value for any unsampled location.

Parameters
  • points (np.ndarray) – Points array to be estimated

  • coords (np.ndarray) – Input coordinates array (2D or 3D)

  • values (np.ndarray) – Interest value array for estimation

  • power (int) – Inversion power

Returns

Estimated values array

Return type

np.ndarray