Skip to content
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

Definition of edges for RPS score #275

Closed
judithberner opened this issue Feb 24, 2021 · 7 comments · Fixed by #277
Closed

Definition of edges for RPS score #275

judithberner opened this issue Feb 24, 2021 · 7 comments · Fixed by #277
Labels
bug Something isn't working

Comments

@judithberner
Copy link

pangeo-data/climpred#562

@judithberner
Copy link
Author

@abjaye
@aaronspring

@judithberner
Copy link
Author

And here a reference:
https://journals.ametsoc.org/view/journals/mwre/135/1/mwr3280.1.xml
"Here, Yk and Ok denote the kth component of the cumulative forecast and observation vectors Y and O, respectively. That is, Yk = Σki=1 yi, with yi being the probabilistic forecast for the event to happen in category i, and Ok = Σki=1 oi with oi = 1 if the observation is in category i and oi = 0 if the observation falls into a category j ≠ i. Note that the RPS is zero for a perfect forecast and positive otherwise."

@aaronspring
Copy link
Collaborator

aaronspring commented Feb 24, 2021

The question in pangeo-data/climpred#562 is whether bins in xhistogram can also be multidimensional for lon and lat. Docs only specify array like.
The use case is calculating an RPS (mostly using xhistogram) based on climatological terciles, which are lon, lat dependent.

@dougiesquire ideas?

@aaronspring
Copy link
Collaborator

One bad and slow but working solution would be looping over the grid. Searching for better ones.

@aaronspring
Copy link
Collaborator

Without using xhist, I think we could take N, here 3 or 4, threshold xarray.DataArrays or even xr.Datasets with lon and lat, and do the counting how many members are in between two thresholds by hand.

@aaronspring
Copy link
Collaborator

I think I will need to rework rps.

Here a prototype for xs.rps and also climpred: https://gist.github.com/aaronspring/3c3db6b7d5f39c08643e818b0964ee6c
which allows xarray.Dataset or xr.DataArray as category_edges

Examples for terciles:
image

@aaronspring aaronspring mentioned this issue Feb 26, 2021
14 tasks
@aaronspring aaronspring added the bug Something isn't working label Feb 26, 2021
@aaronspring
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants