epiforecasts / scoringutils

Utilities for Scoring and Assessing Predictions
https://epiforecasts.io/scoringutils/
Other
46 stars 19 forks source link

Should `wis()` warn about missing values? #731

Open nikosbosse opened 3 months ago

nikosbosse commented 3 months ago

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?

seabbs commented 3 months ago

Isn't as_forecast handling this?

nikosbosse commented 3 months ago

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

seabbs commented 3 months ago

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.