Skip to content

Commit

Permalink
tweaks to scoringutils implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitejohnson committed Nov 6, 2024
1 parent e137def commit 7c84ec0
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions vignettes/spatial_wwinference.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2455,10 +2455,12 @@ hosp_by_date_eval_forecast_plot <- ggplot( # nolint
ylab("Score") +
xlab("Date") +
theme_bw()
# Remove the new scores added to new scoringutils, stick with originals
hosp_scores_forecast <- hosp_scores_forecast |>
dplyr::select(-underprediction, overprediction, dispersion)
attr(hosp_scores_forecast, "metrics") <- c(
"bias", "dss", "crps", "overprediction",
"underprediction", "dispersion", "log_score",
"bias", "dss", "crps", "log_score",
"mad", "ae_median", "se_mean"
)
Expand Down Expand Up @@ -2579,13 +2581,13 @@ hosp_obj_for_eval_nowcast <- all_pred_draws_df %>%
mutate(
predicted = pred_value,
observed = true_value,
sample = draw,
sample_id = draw,
model = inf_model_type
) %>%
select(
predicted,
observed,
sample,
sample_id,
date,
model,
gen_model_type
Expand Down Expand Up @@ -2660,9 +2662,11 @@ hosp_by_date_eval_nowcast_plot <- ggplot(
xlab("Date") +
theme_bw()
hosp_scores_nowcast <- hosp_scores_nowcast %>%
dplyr::select(-underprediction, -overprediction, -dispersion)
attr(hosp_scores_nowcast, "metrics") <- c(
"bias", "dss", "crps", "overprediction",
"underprediction", "dispersion", "log_score",
"bias", "dss", "crps", "log_score",
"mad", "ae_median", "se_mean"
)
hosp_eval_nowcast_plot <- ggplot(
Expand Down

0 comments on commit 7c84ec0

Please sign in to comment.