epiforecasts / scoringutils

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

Make `get_metrics()` more customisable #944

Open nikosbosse opened 1 month ago

nikosbosse commented 1 month ago

We could add additional functions / additional arguments to get_metrics(). Consider something like this:

get_metrics(
  example_quantile, 
  exclude = c("ae_median"), 
  replace = c(wis, purrr::partial(wis, na.rm = TRUE), 
  add_args = c(wis, list(na.rm = TRUE))

or something like this. Not so sure about add_args, but replace could actually be nice?

maybe related: #789

seabbs commented 1 month ago

Hmm yeah maybe... I think my preference would be modular functions for this (i.e you would chain get_metrics into a series of transforms etc) but I don't feel that strongly/