plot_wis | R Documentation |
Visualise the components of the weighted interval score: penalties for over-prediction, under-prediction and for high dispersion (lack of sharpness).
plot_wis(scores, x = "model", relative_contributions = FALSE, flip = FALSE)
scores |
A data.table of scores based on quantile forecasts as
produced by |
x |
The variable from the scores you want to show on the x-Axis. Usually this will be "model". |
relative_contributions |
Logical. Show relative contributions instead
of absolute contributions? Default is |
flip |
Boolean (default is |
A ggplot object showing a contributions from the three components of the weighted interval score.
A ggplot object with a visualisation of the WIS decomposition
Bracher J, Ray E, Gneiting T, Reich, N (2020) Evaluating epidemic forecasts in an interval format. https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1008618
library(ggplot2)
library(magrittr) # pipe operator
scores <- example_quantile %>%
as_forecast_quantile %>%
score()
scores <- summarise_scores(scores, by = c("model", "target_type"))
plot_wis(scores,
x = "model",
relative_contributions = TRUE
) +
facet_wrap(~target_type)
plot_wis(scores,
x = "model",
relative_contributions = FALSE
) +
facet_wrap(~target_type, scales = "free_x")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.