-
Notifications
You must be signed in to change notification settings - Fork 55
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
Restructuring for optimization #67
Comments
Thanks for the suggestions. So far I didn't put too much effort and thinking into the kriging class, so improvements are welcome. I think if we design the That would be cool, as it is a real improvement, but A few more thoughts that might be interesting here:
an experimental interface function is here:
I am not sure if this is still compatible with the latest pykrige version. Since pykrige was moved to the GeoStat Framework and saw some major improvements since. Whatever route we take here, it would be great if any new classes/interfaces for kriging would at least not close that door.
The experimental interface can be found here:
Maybe it is possible to integrate / realize the workflow you have in mind by using the As a note: With @MuellerSeb from Geostat framework I discussed in the past if this would also be a feasible way to 'export' |
For the sklearn estimator, shouldn't we have a class
That's a quite different interface, but could be provided as a wrapper around a Variogram and an OrdinaryKriging instance? |
That's also a nice idea. Then we would have variogram and kriging in one step. I always struggled with turning But at the end of the day we could have both. I still would love the idea of having an estimator around Variogram and Kriging and then not sure. |
Hey there, my two cents on this topic: PyKrige will serve as the place for fancy kriging stuff in the future relying on the GSTools implementations. So, more interfaces to sklearn (like these: GeoStat-Framework/PyKrige#165, GeoStat-Framework/PyKrige#158), and more stuff like CoKriging, Local kriging (with searchradius), spatio temporal kriging all implemented in cython (to be fast and use OpenMP). So it could be a good idea to join forces here. GSTools will bring a new release in the next weeks introducing these new kriging routines, directional variogram estimation, and latlon support along with examples. For the next year I plan to work on PyKrige as described above. I keept the possibility to define GSTools CovModels by setting the variogram method to keep the interface to scikit-gstat alive for now as discussed here: GeoStat-Framework/GSTools#90. But I can imagine better integration. Cheers, Sebastian |
Hey Sebastian, I will have a look at the new stuff hopefully sometimes soon. For us, it will be interesting to decide, wether the I believe at some point in the discussion in gstools I started realizing that interfacing But I personally understand this difference as an advantage, because flavors are different and there are cases in exploratory data analysis where I personally choose skgstat and (many) cases in which I am into random field creation and analysis, which can only be done with gstools. I believe that I didn't understand the interplay of the But again, thanks for your always-welcome comments, Sebastian! Best, Mirko |
Given that almost all variogram models of scikit-gstat are present in GSTools, I think the best way of an interface would be to map these models onto each other. For example scikit-gstats gaussian model is defined as: Only the |
Well, a mapping of the models might make sense anyway, but why would one not use gstools directly then. I think, from my point of view, the interesting part would be if skgstat can be used instead of |
This is solved in https://github.com/mmaelicke/scikit-gstat/releases/tag/v0.5.0 |
I've been thinking a bit about the class structure and how things could/should be structured to make more optimizations possible, esp in the case where you have multiple variograms for different measurements at the same positions:
This is not intended as a "let's hack this now", but as a discussion starter to see what you think, and maybe there's a totally different better way to structure the API.
We could have a class that models a set of positions together with their distance metric:
The idea here is that MetricSpace calculates the (possibly sparse) distance matrix once of all points in coordinates to all other points in coordinates, regardless of how many variograms or krigings you use it for, and MetricSpacePair does the same for the distance matrix of all points in coordinates and all points in new_coordinates.
The text was updated successfully, but these errors were encountered: