scoringutils icon indicating copy to clipboard operation
scoringutils copied to clipboard

Should `wis()` warn about missing values?

Open nikosbosse opened this issue 11 months ago • 3 comments

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?

nikosbosse avatar Mar 23 '24 10:03 nikosbosse

Isn't as_forecast handling this?

seabbs avatar Mar 23 '24 18:03 seabbs

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()

nikosbosse avatar Mar 24 '24 08:03 nikosbosse

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.

seabbs avatar Mar 26 '24 14:03 seabbs