PyKrige Documentation - Read the Docs
PyKrige Documentation
Release 1.7.1.dev10 PyKrige developers
Oct 16, 2023
CONTENTS
1 PyKrige
1
1.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3.1 Kriging algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3.2 Wrappers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3.3 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3.4 Kriging Parameters Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3.5 Regression Kriging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3.6 Classification Kriging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.4 License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Variogram Models
5
2.1 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3 API Reference
7
3.1 Krigging algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.1.1 pykrige.ok.OrdinaryKriging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.1.2 pykrige.uk.UniversalKriging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.1.3 pykrige.ok3d.OrdinaryKriging3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.1.4 pykrige.uk3d.UniversalKriging3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.1.5 pykrige.rk.RegressionKriging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.2 Wrappers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.2.1 pykrige.rk.Krige . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.3 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.3.1 pykrige.kriging_tools.write_asc_grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.3.2 pykrige.kriging_tools.read_asc_grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4 Examples
39
4.1 Universal Kriging Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.2 Ordinary Kriging Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.3 GSTools Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.4 Exact Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.5 Regression kriging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.6 Classification kriging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.7 Geometric example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.8 Three-Dimensional Kriging Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.9 Krige CV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.10 1D Kriging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
i
5 Changelog
59
5.1 Version 1.7.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
5.2 Version 1.7.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
5.3 Version 1.6.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.4 Version 1.6.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.5 Version 1.5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.6 Version 1.5.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.7 Version 1.4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.8 Version 1.4.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.9 Version 1.3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.10 Version 1.3.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.11 Version 1.2.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.12 Version 1.1.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
5.13 Version 1.0.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
5.14 Version 1.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
5.15 Version 0.2.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
5.16 Version 0.1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Bibliography
65
Index
67
ii
CHAPTER
ONE
PYKRIGE
Kriging Toolkit for Python.
1.1 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 for more details and examples.
1.2 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 channel with, conda install -c conda-forge pykrige
1
PyKrige Documentation, Release 1.7.1.dev10
1.3 Features
1.3.1 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 ? ClassificationKriging: An implementation of Simplicial Indicator Kriging
1.3.2 Wrappers
? rk.Krige: A scikit-learn wrapper class for Ordinary and Universal Kriging
1.3.3 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_tools.write_zmap_grid: Writes gridded data to zmap file (\*.zmap) ? kriging_tools.read_zmap_grid: Reads zmap file (\*.zmap)
1.3.4 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.
1.3.5 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 the OrdinaryKriging or the UniversalKriging class, and performs a correction step on the ML regression prediction. A demonstration of the regression kriging is provided in the corresponding example.
1.3.6 Classification Kriging
Simplifical Indicator kriging can be performed with pykrige.ck.ClassificationKriging. This class takes as parameters a scikit-learn classification model, and details of either the OrdinaryKriging or the UniversalKriging class, and performs a correction step on the ML classification prediction. A demonstration of the classification kriging is provided in the corresponding example.
2
Chapter 1. PyKrige
1.4 License
PyKrige uses the BSD 3-Clause License.
PyKrige Documentation, Release 1.7.1.dev10
1.4. License
3
PyKrige Documentation, Release 1.7.1.dev10
4
Chapter 1. PyKrige
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- read the book thief
- how to read the stock market
- how to read the stock market chart
- how to read the s p
- how to read the dow
- how to read the spread
- read the economist online free
- how to read the runes
- read the bible online for free
- why should christians read the old testament
- how to read the nfl betting line
- what order should you read the bible