-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add percentiles to multi-model stats #679
Conversation
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.
wee comment there, mate. All good! Cheers
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.
Great addition @Peter9192! Just a few suggestions for improvement
Thanks for the suggestions @bouweandela! I think I got them all |
Add the option to calculate percentiles in the multi-model preprocessor, using
scipy.stats.mstats.mquantiles
. This is the same function as used in Iris.It works by adding e.g.
p10
orp99
to the list of operators in the recipe.p99.5
will be interpreted as the 99.5 percentile, i.e. the 0.995 quantile, but the decimal point will be changed to a dash-
in the output filename.Unfortunately, the scipy function doesn't work directly on multidimensional arrays. Thus, I added a wrapper that flattens the extra dimensions before passing the array to scipy, similar to what's done in Iris.
Tasks
If you need help with any of the tasks above, please do not hesitate to ask by commenting in the issue or pull request.
Closes #563