View source: R/summarise_scores.R
summarise_scores | R Documentation |
score()
Summarise scores as produced by score()
summarise_scores( scores, by = NULL, fun = mean, relative_skill = FALSE, relative_skill_metric = "auto", metric = deprecated(), baseline = NULL, ... ) summarize_scores( scores, by = NULL, fun = mean, relative_skill = FALSE, relative_skill_metric = "auto", metric = deprecated(), baseline = NULL, ... )
scores |
A data.table of scores as produced by |
by |
character vector with column names to summarise scores by. Default
is |
fun |
a function used for summarising scores. Default is |
relative_skill |
logical, whether or not to compute relative
performance between models based on pairwise comparisons.
If |
relative_skill_metric |
character with the name of the metric for which a relative skill shall be computed. If equal to 'auto' (the default), then this will be either interval score, CRPS or Brier score (depending on which of these is available in the input data) |
metric |
|
baseline |
character string with the name of a model. If a baseline is
given, then a scaled relative skill with respect to the baseline will be
returned. By default ( |
... |
additional parameters that can be passed to the summary function
provided to |
data.table::setDTthreads(1) # only needed to avoid issues on CRAN library(magrittr) # pipe operator scores <- score(example_continuous) summarise_scores(scores) # summarise over samples or quantiles to get one score per forecast scores <- score(example_quantile) summarise_scores(scores) # get scores by model summarise_scores(scores, by = c("model")) # get scores by model and target type summarise_scores(scores, by = c("model", "target_type")) # get standard deviation summarise_scores(scores, by = "model", fun = sd) # round digits summarise_scores(scores, by = c("model")) %>% summarise_scores(fun = signif, digits = 2) # get quantiles of scores # make sure to aggregate over ranges first summarise_scores(scores, by = "model", fun = quantile, probs = c(0.25, 0.5, 0.75) ) # get ranges # summarise_scores(scores, by = "range")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.