Scale error measures based on those of a particular forecaster.

scale_by_forecaster(
  score_card,
  score_cols,
  base_forecaster_name,
  id_cols = c("forecaster", "ahead", "geo_value", "forecast_date", "data_source",
    "signal", "target_end_date", "incidence_period"),
  drop_base_entries = TRUE
)

Arguments

score_card

score_card like that returned by evaluate_predictions()

score_cols

vector of column names in score_card to normalize

base_forecaster_name

name of forecaster in score_card$forecaster column by whose error values the remaining forecasters' errors will be scaled

id_cols

vector of column names in score_card that identify distinct forecasts (i.e. the independent variables of score_card).

drop_base_entries

whether to drop the entries in score_card from base_forecaster_name (when FALSE their corresponding score_cols values will all be 1)

Value

A tibble whose columns are c(id_cols, score_cols) whose id_cols values are copied directly from score_card and whose score_cols values are normalized with respect to base_forecaster_name.