Indicator Kriging#
- class IndicatorKriging(datapoints, indicator_variograms, unknown_locations, kriging_type='ok', process_mean=None, neighbors_range=None, no_neighbors=4, use_all_neighbors_in_range=False, allow_approximate_solutions=False, get_expected_values=True)[source]
Class performs indicator kriging.
- Parameters:
- datapointsnumpy ndarray
The known locations
[x, y, value]
.- indicator_variogramsIndicatorVariograms
Modeled variograms for each threshold.
- unknown_locationsnumpy ndarray
Points where we want to estimate value
(x, y) <-or-> (lon, lat)
.- kriging_typestr, default = ‘ok’
Type of kriging to perform. Possible values: ‘ok’ - ordinary kriging, ‘sk’ - simple kriging.
- process_meanfloat
The mean value of a process over a study area. Should be know before processing. That’s why Simple Kriging has a limited number of applications. You must have multiple samples and well-known area to know this parameter.
- neighbors_rangefloat, default=None
The maximum distance where we search for neighbors. If
None
is given then range is selected from thetheoretical_model
rang
attribute.- no_neighborsint, default = 4
The number of the n-closest neighbors used for interpolation.
- use_all_neighbors_in_rangebool, default = False
True
: if the real number of neighbors within theneighbors_range
is greater than thenumber_of_neighbors
parameter then take all of them anyway.- allow_approximate_solutionsbool, default=False
Allows the approximation of kriging weights based on the OLS algorithm. We don’t recommend set it to
True
if you don’t know what are you doing. This parameter can be useful when you have clusters in your dataset, that can lead to singular or near-singular matrix creation.- get_expected_valuesbool, default=True
If
True
then expected values and variances are calculated.
- Attributes:
- thresholdsnumpy ndarray
Thresholds used for indicator kriging.
- coordinatesnumpy ndarray
Coordinates of unknown locations.
- indicator_predictionsnumpy ndarray
Indicator kriging predictions for each threshold and each unknown location.
- expected_valuesnumpy ndarray
Expected values derived from
indicator_predictions
for each unknown location.- variancesnumpy ndarray
Variances derived from
indicator_predictions
for each unknown location.
Methods
get_indicator_maps()
Returns dictionary with thresholds and indicator maps for each of them.
get_expected_values()
Returns two arrays: one array with coordinates and expected values, and the second with coordinates and variances.
- get_expected_values_maps()[source]
Method returns expected values and variances for each threshold.
- Returns:
- expected_values, variancesnumpy ndarray, numpy ndarray
Expected values and variances.
- get_indicator_maps()[source]
Method returns indicator map for each threshold.
- Returns:
- indicator_mapsDict
Indicator map for each threshold.