Ordinary Kriging in Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 พ.ย. 2024

ความคิดเห็น • 30

  • @lauracardenas2031
    @lauracardenas2031 9 หลายเดือนก่อน

    Hello, thanks for your explication, I was wondering if in this package there are others types of interpolation? For example IDW, natural neigboor...

    • @jeremymaurer9554
      @jeremymaurer9554  8 หลายเดือนก่อน

      This package only has kriging interpolation.

  • @BernardoBaimaMacDowelldaCosta
    @BernardoBaimaMacDowelldaCosta 22 วันที่ผ่านมา

    Hi Jeremy, i tried to use your code example with my DataFrame, but in the Ordinary Kriging, my curve didnt ajust. what can be the problem?

  • @itstomek
    @itstomek ปีที่แล้ว +1

    Hi, Jeremy! Thank you so much for this video, this is exactly what i've been looking for :D

  • @AC4nacho
    @AC4nacho 2 ปีที่แล้ว +1

    Hello Jeremy! Thank you very much for the explanation, you have been very clear.
    I have one question. Is there any way to know the value of phi for specific coordinates?
    For example: x = 0, y = 300, phi = ????.
    Thank you very much in advance.

    • @jeremymaurer9554
      @jeremymaurer9554  2 ปีที่แล้ว

      Hi AC4nacho, so there is no way to know the value of phi at a place where you have not measured it; however, kriging allows you to estimate what that value is, with some uncertainty. So, to know the value of phi you would need to measure it, but we can get an estimate for it (which won't be exactly correct, but the estimate will be as good as possible given the data we have, and we have the uncertainty as well to know how good our estimate it. Hope that helps!

    • @AC4nacho
      @AC4nacho 2 ปีที่แล้ว +2

      @@jeremymaurer9554 I appreciate the clarification. Could you tell me what is the necessary code to obtain that estimated value at a certain point? Thank you very much!

  • @melatybarus6655
    @melatybarus6655 ปีที่แล้ว

    Hello sir, what if the model is given in the form of an equation, where the equation is gama(L) = 100(1-exp(-3L/100)) for L >= 0

  • @annasmoot9132
    @annasmoot9132 2 ปีที่แล้ว

    Thank you so much for this video!
    How would you do this with multiple data sets from different grids? I have ocean surface current data at 2 different resolutions(1.5km and 200m). I want to use kriging to smooth the datasets together on a new grid. Can Pykrige put multiple datasets on the same grid? If so, how?

    • @jeremymaurer9554
      @jeremymaurer9554  2 ปีที่แล้ว

      Hi, this is possible through something called co-kriging, where two different datasets are used to make a prediction. Unfortunately pykroge does not include co-kriging that I know of. There is another package called pyKriging that does include a co-kriging example, so you could try to check that out (just search for that package on GitHub)

    • @annasmoot9132
      @annasmoot9132 2 ปีที่แล้ว

      @@jeremymaurer9554 Thank you so much! I'm working on my MS meteorology thesis and have been stuck on this problem for about 3 weeks. My advisor also says thank you! Also, thanks for making the videos on the math of kriging. Those have also been helpful!

  • @alowwong6672
    @alowwong6672 ปีที่แล้ว

    Hello Jeremy. Thanks for your video. I am looking for the statistics for the variogram fit when using ordinary kriging. There is a method (print_statistic) with three values of Q1, Q2, and cR statistics. Do you know the exact meaning of these three values?
    Thank you very much in advance!

    • @sneakie699
      @sneakie699 ปีที่แล้ว

      Answering many months later but maybe someone would like to know. Q1 statistic is Mean Error. It's the mean of the differences between the observed values and the predicted values. Q2 is Mean Standardized Error, similiar to Q1, although the differences are standardized by the estimated standard deviations. cR is Root Mean Square Standardized Error, it's the root mean square of the standardized differences.

  • @nilamila1
    @nilamila1 ปีที่แล้ว

    Hi Jeremy, I have a shp file containing all the data points and I merged it with another polygon shp file. now I have a new shp file containing all data points but also the study area. can you suggest how I can use the shp file to define the boundary of the kriging area?
    Thank you .

    • @jeremymaurer9554
      @jeremymaurer9554  ปีที่แล้ว

      Hi @nilamila1, you could go about this in a couple ways. One way is to simply use the x/y values from your merged dataset. You only need the x/y values in order to calculate the distance between all the pairs of points, which you can then use in the kriging analysis. Alternatively, you can use the exterior of the shapefile to generate a bounding box of your region and use a regular grid of points inside that. For example, the shapely package in Python allows you load a shapefile and then get its bounds. You can use that with numpy to generate a regular grid of points.

  • @maxinteltech3321
    @maxinteltech3321 2 ปีที่แล้ว +1

    Great video. Thank you veru much

  • @geraldmogi2937
    @geraldmogi2937 2 ปีที่แล้ว

    Hello Sir, It’s a great video. I’m trying to estimate porosity right know using kriging. I have a question, do you know how to extract the kriging value (x,y,por) from each cell?

    • @geraldmogi2937
      @geraldmogi2937 2 ปีที่แล้ว

      The reason is because i want to do weigthed sum overlay with my saturation water kriging result.

  • @lutherbrown8873
    @lutherbrown8873 2 หลายเดือนก่อน

    thanks, this is very helpful

  • @nynxoscuro3868
    @nynxoscuro3868 2 ปีที่แล้ว

    Question: What if instead of coordinates there are categorical markers for geographic regions. Can this technique still be used?

    • @jeremymaurer9554
      @jeremymaurer9554  2 ปีที่แล้ว

      Hi Nynx, there is a variant of kriging called "indicator kriging" that is something like a categorical variable, if there are only two categories. See here:pro.arcgis.com/en/pro-app/2.8/help/analysis/geostatistical-analyst/understanding-indicator-kriging.htm for some details. For more categories, things get a bit more complicated since it can be hard to define the semivariance for categories (i.e. how close is "field" to "forest"? And which is more similar to "shrubland"? However, there are other methods that can be used, such as nearest-neighbor or Gaussian mixture models (GMMs). For the later, see here: scikit-learn.org/0.15/auto_examples/mixture/plot_gmm_classifier.html for some explanation. Hope that helps!

  • @radames09
    @radames09 2 ปีที่แล้ว

    Hi, Jeremy! I'm a geophysics student like you are or were (I don't know for sure) and I'm looking for a clue on how to do this Ordinary Kriging in three dimensions. I have some well logs with their respective locations and I'd like to build a low-frequency velocity field, but I don't think repeating this 2D Ordinary Kriging for each two-way time sample is the smartest thing to do.

    • @radames09
      @radames09 2 ปีที่แล้ว

      I just saw that you're Ph.D.! I wasn't entirely wrong about being a student, since we never stop studying ...

    • @radames09
      @radames09 2 ปีที่แล้ว

      I found out about PyKrige 3D, sorry for bothering you

    • @jeremymaurer9554
      @jeremymaurer9554  2 ปีที่แล้ว

      @@radames09 Not a problem! Hopefully PyKrige3D works for you. Basic 3d kriging can be actually very similar to 2D by simply calculating scaled distance in 3 dimensions. You will likely want to have a different range in the vertical direction than the horizontal, which you should be able to estimate with some basic variogram analysis. You would then use the appropriately scaled distance when calculating the covariance. PyKrige nicely does a lot of that for you, but it's good to have an idea of what's going on under the hood!

    • @radames09
      @radames09 2 ปีที่แล้ว

      @@jeremymaurer9554 Thank you very much! I loved the content you're uploading around here

    • @TheKillerJin
      @TheKillerJin 2 ปีที่แล้ว

      oh rada e ai kk