epiforecasts / scoringutils

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

metrics_ -> metrics.scoringutils.quantile etc #832

Open seabbs opened 1 month ago

seabbs commented 1 month ago

As the title it seems like metrics_ functions should be exported to S3 methods? They can dispatch on the input to score when used in the default mode. This would streamline adding a custom thing to score etc.

nikosbosse commented 1 month ago

But it would also make it a bit harder to customise your own lists of functions, wouldn't it? Because you'd always have to pass in a forecast object.

This would streamline adding a custom thing to score etc. Could you elaborate more please?

seabbs commented 1 month ago

why? You can just call the underlying list (i.e metrics.class()) directly?

nikosbosse commented 1 day ago

So this would boil down to people calling something like metrics(example_quantile) (or metrics(their_data)) instead of metrics_quantile(), right? And would make the metrics() function more naturally customisable.

@Bisaloo what are your thoughts on this?