epiforecasts / scoringutils

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

Make `get_forecast_unit()` and friends customisable such that they can work with new forecast classes #740

Open nikosbosse opened 5 months ago

nikosbosse commented 5 months ago

get_forecast_unit() currently relies on an internal call to get_protected_columns() to identify which columns it should ignore. These are currently things like quantile_level and sample_id.

This all works well within the current package. But once you start adding new classes then maybe that won't work so well anymore. I think what we should do is add a protected_columns argument to get_forecast_unit() and friends such that you could manually define which columns are protected. Similarly for set_forecast_unit(). Probably as_forecast() needs a ... arg.

Not proposing we do that now, but if we're serious about allowing users to write their custom classes, then we should likely do that at some point. (get_forecast_type() may be another candidate for some additional tweaking, as well as the collapse argument for get_forecast_counts())