Add separate functions for wis components#397
Merged
nikosbosse merged 5 commits intorework-add_coverage()from Nov 15, 2023
Merged
Add separate functions for wis components#397nikosbosse merged 5 commits intorework-add_coverage()from
nikosbosse merged 5 commits intorework-add_coverage()from
Conversation
seabbs
requested changes
Nov 15, 2023
Contributor
seabbs
left a comment
There was a problem hiding this comment.
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) { |
Contributor
There was a problem hiding this comment.
do these intentionally not expose any of the arguments of WIS?
Collaborator
Author
There was a problem hiding this comment.
argh no. These are due to me being stupid. Changed the code.
Base automatically changed from
update-quantile-metrics
to
rework-add_coverage()
November 15, 2023 14:37
…, `underprediction()` and `dispersion()`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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!