-
Notifications
You must be signed in to change notification settings - Fork 21
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 separate functions for wis components #397
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.
In the review note you should be linking to an issue that explains why you are doing this for the user!
This PR has several linting issues that need resolving.
Do you want to expose wis arguments in these functions?
These should have trivial tests now as there is no reason not to do so.
R/metrics-quantile.R
Outdated
#' `dispersion()`: a numeric vector with dispersion values (one per observation) | ||
#' @export | ||
#' @rdname wis | ||
dispersion <- function(observed, predicted, quantile) { |
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.
do these intentionally not expose any of the arguments of WIS?
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.
argh no. These are due to me being stupid. Changed the code.
…, `underprediction()` and `dispersion()`
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.
LGTM
This PR
dispersion()
,overprediction()
andunderprediction()
to compute WIS components.wis()
At the moment the computations are a bit wasteful as all of the component functions just call
wis()
and only use the relevant info from that. We could redesign that in the future, but for now I didn't think it was worth it given that the function is otherwise not very computation-heavy.Also look how modular the PR is!