Description Usage Arguments Value Author(s) Examples
View source: R/eval_forecasts_binary.R
Evaluate forecasts in a Binary Format
1 2 3 4 5 6 7 8 9 10 | eval_forecasts_binary(
data,
by,
summarise_by,
metrics,
quantiles,
sd,
summarised,
verbose
)
|
data |
A data.frame or data.table with the predictions and observations. Note: it is easiest to have a look at the example files provided in the package and in the examples below. The following columns need to be present:
For integer and continuous forecasts a
For quantile forecasts the data can be provided in variety of formats. You
can either use a range-based format or a quantile-based format. (You can
convert between formats using
For a range format (long) forecast you need
Alternatively you can also provide the format in a wide range format. This format needs
|
by |
character vector of columns to group scoring by. This should be the
lowest level of grouping possible, i.e. the unit of the individual
observation. This is important as many functions work on individual
observations. If you want a different level of aggregation, you should use
|
summarise_by |
character vector of columns to group the summary by. By
default, this is equal to 'by' and no summary takes place.
But sometimes you may want to to summarise
over categories different from the scoring.
|
metrics |
the metrics you want to have in the output. If 'NULL' (the default), all available metrics will be computed. |
quantiles |
numeric vector of quantiles to be returned when summarising. Instead of just returning a mean, quantiles will be returned for the groups specified through 'summarise_by'. By default, no quantiles are returned. |
sd |
if TRUE (the default is FALSE) the standard deviation of all metrics will be returned when summarising. |
summarised |
Summarise arguments (i.e. take the mean per group specified in group_by. Default is TRUE. |
verbose |
print out additional helpful messages (default is TRUE) |
A data.table with appropriate scores. For more information see
eval_forecasts
Nikos Bosse nikosbosse@gmail.com
1 2 3 4 5 6 | # Probability Forecast for Binary Target
binary_example <- data.table::setDT(scoringutils2::binary_example_data)
eval <- scoringutils2::eval_forecasts(data = binary_example,
summarise_by = c("model"),
quantiles = c(0.5), sd = TRUE,
verbose = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.