Skip to content

Make default metrics be the output of a function, rather than a stored data set #474

@nikosbosse

Description

@nikosbosse

Update: we reached the conclusion to make a function instead of stored data object. This needs to be implemented.


Default metrics for score() are currently stored as a data object in the package and get created like this:

metrics_quantile <- list(
  "wis" = wis,
  "overprediction" = overprediction,
  "underprediction" = underprediction,
  "dispersion" = dispersion,
  "bias" = bias_quantile,
  "coverage_50" = interval_coverage_quantile,
  "coverage_90" = \(...) {run_safely(..., range = 90, fun = interval_coverage_quantile)},
  "coverage_deviation" = interval_coverage_deviation_quantile,
  "ae_median" = ae_median_quantile
)
usethis::use_data(metrics_quantile, overwrite = TRUE)

@seabbs noted that he didn't like this and would prefer this to be a function instead of a stored data object. Could you please elaborate a bit why you think that and what the trade-offs are?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions