pykrige.rk.Krige

class pykrige.rk.Krige(method='ordinary', variogram_model='linear', nlags=6, weight=False, n_closest_points=10, verbose=False, exact_values=True, pseudo_inv=False, pseudo_inv_type='pinv', variogram_parameters=None, variogram_function=None, anisotropy_scaling=(1.0, 1.0), anisotropy_angle=(0.0, 0.0, 0.0), enable_statistics=False, coordinates_type='euclidean', drift_terms=None, point_drift=None, ext_drift_grid=(None, None, None), functional_drift=None)[source]

A scikit-learn wrapper class for Ordinary and Universal Kriging.

This works with both Grid/RandomSearchCv for finding the best Krige parameters combination for a problem.

Parameters
  • method (str, optional) – type of kriging to be performed

  • variogram_model (str, optional) – variogram model to be used during Kriging

  • nlags (int) – see OK/UK class description

  • weight (bool) – see OK/UK class description

  • n_closest_points (int) – number of closest points to be used during Ordinary Kriging

  • verbose (bool) – see OK/UK class description

  • exact_values (bool) – see OK/UK class description

  • variogram_parameters (list or dict) – see OK/UK class description

  • variogram_function (callable) – see OK/UK class description

  • anisotropy_scaling (tuple) – single value for 2D (UK/OK) and two values in 3D (UK3D/OK3D)

  • anisotropy_angle (tuple) – single value for 2D (UK/OK) and three values in 3D (UK3D/OK3D)

  • enable_statistics (bool) – see OK class description

  • coordinates_type (str) – see OK/UK class description

  • drift_terms (list of strings) – see UK/UK3D class description

  • point_drift (array_like) – see UK class description

  • ext_drift_grid (tuple) – Holding the three values external_drift, external_drift_x and external_drift_z for the UK class

  • functional_drift (list of callable) – see UK/UK3D class description

Methods

execute(points, *args, **kwargs)

Execute.

fit(x, y, *args, **kwargs)

Fit the current model.

get_params([deep])

Get parameters for this estimator.

predict(x, *args, **kwargs)

Predict.

score(X, y[, sample_weight])

Return the coefficient of determination of the prediction.

set_params(**params)

Set the parameters of this estimator.

__init__(method='ordinary', variogram_model='linear', nlags=6, weight=False, n_closest_points=10, verbose=False, exact_values=True, pseudo_inv=False, pseudo_inv_type='pinv', variogram_parameters=None, variogram_function=None, anisotropy_scaling=(1.0, 1.0), anisotropy_angle=(0.0, 0.0, 0.0), enable_statistics=False, coordinates_type='euclidean', drift_terms=None, point_drift=None, ext_drift_grid=(None, None, None), functional_drift=None)[source]

Methods

__init__([method, variogram_model, nlags, ...])

execute(points, *args, **kwargs)

Execute.

fit(x, y, *args, **kwargs)

Fit the current model.

get_params([deep])

Get parameters for this estimator.

predict(x, *args, **kwargs)

Predict.

score(X, y[, sample_weight])

Return the coefficient of determination of the prediction.

set_params(**params)

Set the parameters of this estimator.