Closed nikosbosse closed 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.29%. Comparing base (
84cbcc9
) to head (96c1010
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
This PR closes #761.
Previously, the function
quantile_score()
inherited its arguments fromwis()
, but the actual format it expected was different from the one used by the other quantile-based metrics. The function used to expect a vector of observed values and a single vector with predicted values and a single quantile level. This is in contrast to the other quantile-based functions, which usually expect a matrix of predicted values and are also able to accept several quantile levels.This PR changes the expected input format of
quantile_score()
such that it conforms to what the other functions accept. Instead of computing the quantile score for a single vector, it now computes the score for several quantile forecasts and returns an average score. One implication of this is that the output ofwis()
andquantile_score()
are now mostly identical, apart from the fact thatwis()
can only compute something if two quantiles form a prediction intervalquantile_score()
can compute a score for a single quantile level, but doesn't offer the decompositionThe PR
quantile_score()
sweep()
function (admittedly I'm still not entirely sure what it does).R
magic of the ancients, forged before the time of man.I haven't added a news item because the update is changing the input formats for all functions (we just hadn't properly implemented that change for
quantile_score()
yet)Checklist
lintr::lint_package()
to check for style issues introduced by my changes.