scoringutils
scoringutils copied to clipboard
Should `wis()` warn about missing values?
Consider the following example:
df <- copy(example_quantile)
df[quantile_level == 0.75, predicted := NA]
df <- df[target_end_date == "2021-05-08" & location == "DE"]
df |>
as_forecast() |>
score(metrics = metrics_quantile(select = "wis"))
This just produces a normal output. wis()
does have an argument na.rm = TRUE
, so in theory all works as expected. But users might not be aware of what happens.
Should wis()
(and maybe other functions) warn you if they encounter missing values?
Isn't as_forecast handling this?
Hmm. Maybe a big part of the answer is just to make the message in as_forecast()
not be terrible. I kind of started ignoring the "some NA values get removed" message because the example data always has NA values - so distinguishing one type of NA value from another is maybe helpful.
But since it is the weighted interval score, I think it could also be fine if that function warns if something is unexpected. People might also use it directly and independently of as_forecast()
We don't want to set up a situation where score is throwing the same warnings as as_forecast but agree if can be made useful.