-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
where are the search parameters #54
Comments
PyKrige doesn't use search parameters in the same way that Surfer does; by default all points in the dataset are used to solve the kriging system. There is an option to specify a number of closest points to use in solving the kriging problem (the 'moving window' capability). You can invoke that by using the |
Also, a good description of Surfer search parameters can be found here and in here, I think (never used it myself). As @bsmurphy mentioned, the only search parameter we support at the moment is |
so forgive me here, as i'm not all that familar with the innards of the krigging. but doesn't the search ellipse allow one to make an assumption about the data, ie the data are going to vary in a similar manner. for my case, we use the search window to define the cross shore and along shore widths of beach transect data. where we can make the assumption about the data that the beach profile will vary more in the cross shore direction than it does in the alongshore direction. ie the beach gets deeper faster than it varies moving down the beach. if one uses a 'moving window' or n_closest_points I feel like that would weight them, for lack of a better way to put it, weird? no? |
Sounds like you would want to use the anisotropy parameters in your problem -- you can specify the angle of anisotropy and the relative scaling between the principle directions in order to essentially define a new internal coordinate system in which the variogram model is the same in all directions. Inside the code, once you specify the anisotropy direction and scaling, the data coordinates are translated into this new coordinate system and then the kriging problem is actually solved in this 'uniform' coordinate system. The point is just to take into account exactly your kind of problem, where things aren't changing in the same way in different directions. Adjusting for anisotropy makes the problem 'homogeneous' in some sense. You're right, using a uniform search radius or n_closest_points does somewhat ignore this kind of anisotropy. @rth, if we do end up implementing a search radius kwarg (which I think we should do, definitely a nice feature to have), we should be sure to search on the anisotropy-adjusted data, that way it'll be in the 'uniform' coordinate space... Using an elliptical search window would allow you to do something similar, but I think actually implementing anisotropy explicitly (i.e., in the PyKrige formulation) would be a better bet in your case... If you end up using it on your data, please let us know how it works for you! I've never used the anisotropy parameters myself in any problems, so any input on how it's working would be useful. (Also, if you need help making sense of the anisotropy settings, let us know...) |
so i implement the following arguments in addition to the search ellipse in surfer. which I've also included in the initialization on your OK class |
So the call to OrdinaryKriging(x, y, z, anisotropy_angle=90., anisotropy_scaling=2., variogram_model='linear', variogram_parameters=[1., 0.]) I'd recommend looking at the docstring for the |
so my notes are two fold: First, If the anisotropy parameters take care of the anisotropy of the data, then what do the search parameters do? are the simply to make the variogram generation more efficient (ie not looking at the whole data set) ? Secondly, while I've added those, i'm running into constant memory issues when using this interpolation scheme. I've attached the data (and code) for reference. |
Closing due to inactivity. Feel free to re-open. |
Hey there, New user here. Trying to do some of the krigging we do in SURFER using an open source library like this. Where can the user define the search parameters?
The text was updated successfully, but these errors were encountered: