Help with kriging,weights and matrices

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with kriging,weights and matrices

beck
Hello!
I have written a Kriging-Interpolator a while ago, and recently started to extend it. It now does automagic modelfitting, and thats were my problems started.
I split the input data into overlapping tiles, for each of which i produce a exp. variogram, bin it to around 20 bins, and turn that into a polynomial of 2th to 5th degree.
In the actual interpolation i then do linear interpolation between the polynomials to get my weighting-function for that position.
i however noticed that some generated polynomials will produce new extrema in the output when the samples lie far from the to-be-kriged position.
looking into what happened in those cases i noticed negative weights appearing. so i thought about it and its clear to me how negative weights, while still giving a nice sum-of-weights==1, can produce new extrema.
what i dont really understand is the condition it takes to make the matrix-inversion spit out negative values.
apart from sample points being at the end of the distance-range. the polynomials which do and those that dont result in negative weights dont look systematically different to me. has to be the samples.
what are the ways to cope with this in a solid manner?
the only thing i found so far would be to remove the furthest sample with a negative weight and start over, but that seems like a bad hack to me.
maybe there is a way of sorting the samples or a limitation to impose on the polynomials....

thanks for your attention, all ideas/tips/hints are welcome



Reply | Threaded
Open this post in threaded view
|

RE: Help with kriging,weights and matrices

Dan Cornford

Hi Beck,

 

  this is a well-known problem in geostatistics, and arises because you are not constraining your covariance function (or variogram) to be positive definition (negative semi-definite). The easiest way to impose these constraints is to fit your model from a valid set of functions which will ensure positive definiteness of the covariance. Without this you will get all sorts of problems when solving your kriging equations. Reading pretty much any text on geostatistics will show you this! Just google on ‘valid covariance functions’ or variograms …

 

cheers

 

Dan

 

From: beck [via 52° North - Geostatistics Community Forum] [mailto:ml-node+[hidden email]]
Sent: 12 March 2013 11:29
To: Cornford, Dan
Subject: Help with kriging,weights and matrices

 

Hello!
I have written a Kriging-Interpolator a while ago, and recently started to extend it. It now does automagic modelfitting, and thats were my problems started.
I split the input data into overlapping tiles, for each of which i produce a exp. variogram, bin it to around 20 bins, and turn that into a polynomial of 2th to 5th degree.
In the actual interpolation i then do linear interpolation between the polynomials to get my weighting-function for that position.
i however noticed that some generated polynomials will produce new extrema in the output when the samples lie far from the to-be-kriged position.
looking into what happened in those cases i noticed negative weights appearing. so i thought about it and its clear to me how negative weights, while still giving a nice sum-of-weights==1, can produce new extrema.
what i dont really understand is the condition it takes to make the matrix-inversion spit out negative values.
apart from sample points being at the end of the distance-range. the polynomials which do and those that dont result in negative weights dont look systematically different to me. has to be the samples.
what are the ways to cope with this in a solid manner?
the only thing i found so far would be to remove the furthest sample with a negative weight and start over, but that seems like a bad hack to me.
maybe there is a way of sorting the samples or a limitation to impose on the polynomials....

thanks for your attention, all ideas/tips/hints are welcome





If you reply to this email, your message will be added to the discussion below:

http://geostatistics.forum.52north.org/Help-with-kriging-weights-and-matrices-tp4022880.html

To start a new topic under 52° North - Geostatistics Community Forum, email [hidden email]
To unsubscribe from 52° North - Geostatistics Community Forum, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

RE: Help with kriging,weights and matrices

beck
Hello again,
googled and read, and my covariance functions and with it the resulting matrix are positive definite. I understood that negative weights can occur even if the covariancefunc is licit, and can be a wanted effect. Searching more as Dan pointed out i found however the reasons for negative weights such as screening-effects or covariance functions with certain behavior near origin and some papers on how to avoid or correct them.  If someone else comes along wanting to learn about this:  
Szidarovszky,Baafi and Kim 1996
Barnes and You 1992
Deutsch 1996
Also search for 'nonnegative predictions' to understand more about the negative weights.

Have a nice weekend and thanks to Dan.