scoringutils
scoringutils copied to clipboard
Rework `interval_score` function so that it also works with quantiles, not only ranges
The input format would then be something like function(predictions, quantiles, true_value).
Also think about whether the current function really needs several true_values as input
A quantile_score function could look like this:
quantile_score <- function(true_values,
predictions,
quantiles,
weigh = TRUE,
separate_results = FALSE) {
2 * (ifelse(y <= predictions) - quantiles) * (predictions - true_value)
}
reference: https://journals.plos.org/ploscompbiol/article/file?type=supplementary&id=info:doi/10.1371/journal.pcbi.1008618.s001
This is superseded by the new wis()
function