Skip to main content

Kriging Toolkit for Python.

Project description

https://zenodo.org/badge/DOI/10.5281/zenodo.3738604.svg https://badge.fury.io/py/PyKrige.svg https://img.shields.io/conda/vn/conda-forge/pykrige.svg https://travis-ci.com/GeoStat-Framework/PyKrige.svg?branch=master https://coveralls.io/repos/github/GeoStat-Framework/PyKrige/badge.svg?branch=master Documentation Status https://img.shields.io/badge/code%20style-black-000000.svg
PyKrige

Kriging Toolkit for Python.

Purpose

The code supports 2D and 3D ordinary and universal kriging. Standard variogram models (linear, power, spherical, gaussian, exponential) are built in, but custom variogram models can also be used. The 2D universal kriging code currently supports regional-linear, point-logarithmic, and external drift terms, while the 3D universal kriging code supports a regional-linear drift term in all three spatial dimensions. Both universal kriging classes also support generic ‘specified’ and ‘functional’ drift capabilities. With the ‘specified’ drift capability, the user may manually specify the values of the drift(s) at each data point and all grid points. With the ‘functional’ drift capability, the user may provide callable function(s) of the spatial coordinates that define the drift(s). The package includes a module that contains functions that should be useful in working with ASCII grid files (*.asc).

See the documentation at http://pykrige.readthedocs.io/ for more details and examples.

Installation

PyKrige requires Python 3.5+ as well as numpy, scipy. It can be installed from PyPi with,

pip install pykrige

scikit-learn is an optional dependency needed for parameter tuning and regression kriging. matplotlib is an optional dependency needed for plotting.

If you use conda, PyKrige can be installed from the conda-forge channel with,

conda install -c conda-forge pykrige

Features

Kriging algorithms

  • OrdinaryKriging: 2D ordinary kriging with estimated mean
  • UniversalKriging: 2D universal kriging providing drift terms
  • OrdinaryKriging3D: 3D ordinary kriging
  • UniversalKriging3D: 3D universal kriging
  • RegressionKriging: An implementation of Regression-Kriging

Wrappers

  • rk.Krige: A scikit-learn wrapper class for Ordinary and Universal Kriging

Tools

  • kriging_tools.write_asc_grid: Writes gridded data to ASCII grid file (*.asc)
  • kriging_tools.read_asc_grid: Reads ASCII grid file (*.asc)

Kriging Parameters Tuning

A scikit-learn compatible API for parameter tuning by cross-validation is exposed in sklearn.model_selection.GridSearchCV. See the Krige CV example for a more practical illustration.

Regression Kriging

Regression kriging can be performed with pykrige.rk.RegressionKriging. This class takes as parameters a scikit-learn regression model, and details of either either the OrdinaryKriging or the UniversalKriging class, and performs a correction steps on the ML regression prediction.

A demonstration of the regression kriging is provided in the corresponding example.

License

PyKrige uses the BSD 3-Clause License.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for PyKrige, version 1.5.1
Filename, size File type Python version Upload date Hashes
Filename, size PyKrige-1.5.1-cp35-cp35m-macosx_10_9_x86_64.whl (449.8 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp35-cp35m-manylinux1_i686.whl (927.1 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp35-cp35m-manylinux1_x86_64.whl (976.4 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp35-cp35m-manylinux2010_i686.whl (927.1 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp35-cp35m-manylinux2010_x86_64.whl (976.4 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp35-cp35m-win32.whl (415.7 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp35-cp35m-win_amd64.whl (446.1 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp36-cp36m-macosx_10_9_x86_64.whl (454.8 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp36-cp36m-manylinux1_i686.whl (939.4 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp36-cp36m-manylinux1_x86_64.whl (986.7 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp36-cp36m-manylinux2010_i686.whl (939.4 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp36-cp36m-manylinux2010_x86_64.whl (986.7 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp36-cp36m-win32.whl (417.4 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp36-cp36m-win_amd64.whl (448.1 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp37-cp37m-macosx_10_9_x86_64.whl (455.0 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp37-cp37m-manylinux1_i686.whl (940.4 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp37-cp37m-manylinux1_x86_64.whl (986.8 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp37-cp37m-manylinux2010_i686.whl (940.4 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp37-cp37m-manylinux2010_x86_64.whl (986.8 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp37-cp37m-win32.whl (417.3 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp37-cp37m-win_amd64.whl (448.1 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp38-cp38-macosx_10_9_x86_64.whl (457.3 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp38-cp38-manylinux1_i686.whl (1.0 MB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp38-cp38-manylinux1_x86_64.whl (1.1 MB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp38-cp38-manylinux2010_i686.whl (1.0 MB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp38-cp38-manylinux2010_x86_64.whl (1.1 MB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp38-cp38-win32.whl (420.4 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size PyKrige-1.5.1-cp38-cp38-win_amd64.whl (450.4 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size PyKrige-1.5.1.tar.gz (949.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page