-
Notifications
You must be signed in to change notification settings - Fork 44
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
Metrics for temporal subgroups #266
Conversation
@wpreimes yes, I'd support to move this class to cadati Is there not way to inherit from a standard python datetime object or similar? |
src/pytesmo/validation_framework/metric_calculators_adapters.py
Outdated
Show resolved
Hide resolved
tests/test_validation_framework/test_metric_calculators_adapters.py
Outdated
Show resolved
Hide resolved
tests/test_validation_framework/test_metric_calculators_adapters.py
Outdated
Show resolved
Hide resolved
src/pytesmo/validation_framework/metric_calculators_adapters.py
Outdated
Show resolved
Hide resolved
@s-scherrer thanks for the feedback. I will update this PR. I will also add an small example notebook, which might clear up a few things. |
I have implemented the above suggested changes. There is now an example in the the notebook at |
Add a more flexible wrapper to calculate metrics for temporal subsets, e.g to compute metrics using data for certain days of a year. We used this one e.g. in SMART-DRI to calculate correlation values for groups of 10-days (over 13 years) to estimate varying levels of subsurface scattering throughout the year (wet/dry season).
Before, this was only possible on a monthly basis: https://github.com/TUW-GEO/pytesmo/blob/master/src/pytesmo/validation_framework/metric_calculators_adapters.py#L43
Now there is a data distributor to extract certain dates, date_ranges for any year to apply the metrics calculator to.
However, this might be over-complicated, but I haven't found a way to only use e.g. pandas for this yet, but I'm pretty sure it is possible using groupby or so.
@pstradio @s-scherrer if you have any comments let me know. If we find no better solution I will probably add this class to cadati @sebhahn