-
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
Metric space #68
Metric space #68
Conversation
…) and coords and values
Hi @mmaelicke ! Please take a look. There is one issue with this code: I'm not sure how to serialize the parameters of a harmonized model to the describe() output in such a way that the model function could be recreated in Kriging. I haven't worked with harmonized models, so I'm not sure how it's supposed to work. Any thoughts? |
skgstat/Variogram.py
Outdated
harmonize = False | ||
if not callable(model): | ||
if model == "harmonize": | ||
# FIXME: How do we serialize a harmonized model in describe()? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where I don't really know what to do...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will have a look at it as soon as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @redhog, I don't find the time right now to solve this (lockdown here, kids at home etc.)...
Would it be a possible pathway for you to not include the parameters of harmonized models for now? Then, the Kriging class would raise a NotImplementedError
if model params are missing. Then, we could merge this PR and open an issue concerning the harmonized model, to keep it on the agenda.
I just don't want to hold you up any longer, sry about that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't need harmonized models myself, so for me that'd work. However, it would break the workflow for anyone who do. If you think that's not too big a deal, we could merge anyway. Alternatively I guess I could add a hack workaround: Copy the model function (not just name) here:
scikit-gstat/skgstat/Kriging.py
Line 105 in cf0751b
variogram = variogram.describe() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then I would go for hacky workaround along with an issue opened to fix it at any later point in time.
Heyas @mmaelicke!
And I use a maxlag of 50... Without that, it eats > 4Gb RAM to generate the variogram. This is a smallish dataset among the ones we're working with. Just to give you an idea about the scale I'm trying to handle. |
Hey, thank man! Looks nice! |
|
Codecov Report
@@ Coverage Diff @@
## master #68 +/- ##
==========================================
- Coverage 90.72% 89.10% -1.63%
==========================================
Files 14 16 +2
Lines 1650 1808 +158
==========================================
+ Hits 1497 1611 +114
- Misses 153 197 +44
Continue to review full report at Codecov.
|
Heyas! I think this is ready for merging now. Added some unit tests. |
Nice, I'll have a look at it somewhere this week. EDIT: I just had really quickly scanned the changes and it looks like you took care of all that already. Really nice! |
First steps towards extracting all distance metrics representation into a separate object as outlined in #67