GeoStat-Framework / PyKrige

Kriging Toolkit for Python
https://pykrige.readthedocs.io
BSD 3-Clause "New" or "Revised" License
759 stars 188 forks source link

What is the difference between Universal Kriging and Regression Kriging? #172

Closed keua closed 3 years ago

keua commented 3 years ago

Hello guys, I'm currently using the Pykrige library for doing traffic volume interpolation in a road network Currently I use ordinary kriging, but I would like to improve my estimations by adding extra information, so I'm thinking on use Universal Kriging or Regression Kriging. From the link, you provide in the documentation https://en.wikipedia.org/wiki/Regression-kriging, it seems that these two techniques are equivalent, so I would like to understand whether in your implementation this is the case, or if there is something different when using one or the other. I really appreciate your answer and thanks for the awesome work you are doing by maintaining this package.

MuellerSeb commented 3 years ago

An answer was given here: #167

Universal- and Regression-Kriging both deal with a given drift or trend.

In literature, the term detrending is handled very differently in terms of kriging. We have several algorithms that deal with this:

Does that help?

Cheers, Sebastian

keua commented 3 years ago

Thank you very much, the differences are clear now. Just to be sure, EDK is not implemented in Pykrige, right? Is there any other package to implement EDK? Again thanks for your answer, Keneth

keua commented 3 years ago

Hello again, Going through the issues I found this #155

I can give you a short survey:

  • regional linear drift is a functional drift, where a linear regional model is fitted automatically with universal kriging (classical case)
  • point-logarithmic drift is used for water level kriging (see here)
  • external Z drift is a special feature, where you can provide grided data in 2D, where the z-value (for example the DEM data) is interpolated to your target points
  • specified drift is the classical form of external drift kriging, where a linear correlated second variable needs to given at all conditioning points AND at the target points for kriging (this could also be used for DEM data, but you have to provide the data at the exact points, where you want to krige the temperature)
  • functional drift is like the regional linear drift, but you can give a set of self defined functions, that depend on the spatial position to generate the drift terms (for regional linear drift in 3D for example, you have 3 functions: f1(x,y,z)=x, f2(x,y,z)=y, f3(x,y,z)=z)

If your DEM data is grided and you don't have the elevation data at your target points, you should use external Z drift otherwise use specified drift.

Does that help?

Cheers, Sebastian

I will specifically point out to the specified drift where you mention that this option is the classical form of external drift kriging. Is it correct then, to say that using the implementation of UK with specified drift corresponds to EDK?

MuellerSeb commented 3 years ago

That is correct! :wink:

keua commented 3 years ago

Thanks again for your answer and for your work with the package.