Busabase
Busabase is an open-source (MIT) database and workspace for AI agents — data, docs, skills, and apps in one place. Run it locally, self-host it inside your network, or use Busabase Cloud, and turn age
翻訳待ち
Facilitate the evaluation of forecasts in a convenient framework based on data.table. It allows user to to check their forecasts and diagnose issues, to visualise forecasts and missing data, to transf
翻訳待ち
データR · TeXGitHub @epiforecastsオンライン所有者未確認
Have you tried it? One tap is enough. No sign-in needed.
Utilities for Scoring and Assessing Predictions
翻訳待ち
Loading the full README.
Read the full README ↗The scoringutils package facilitates the process of evaluating
forecasts in R, using a convenient and flexible data.table-based
framework. It provides broad functionality to check the input data and
diagnose issues, to visualise forecasts and missing data, to transform
data before scoring, to handle missing forecasts, to aggregate scores,
and to visualise the results of the evaluation. The package is easily
extendable, meaning that users can supply their own scoring rules or
extend existing classes to handle new types of forecasts.
A good starting point are the vignettes
Details on the metrics implemented and Scoring forecasts directly. We also have several related manuscripts
and
Nikos I. Bosse, Sam Abbott, Anne Cori, Edwin van Leeuwen, Johannes Bracher* and Sebastian Funk* (*: equal contribution) (2023).
Scoring epidemiological forecasts on transformed scales, PLoS Comput Biol 19(8): e1011393 https://doi.org/10.1371/journal.pcbi.1011393
for specific details on transforming forecasts for scoring.
Install the CRAN version of this package using
install.packages("scoringutils")
Install the unstable development version from GitHub using
remotes::install_github("epiforecasts/scoringutils", dependencies = TRUE)
scoringutils currently supports scoring the following forecast types:
binary: a probability for a binary (yes/no) outcome variable.point: a forecast for a continuous or discrete outcome variable that
is represented by a single number.quantile: a probabilistic forecast for a continuous or discrete
outcome variable, with the forecast distribution represented by a set
of predictive quantiles.sample: a probabilistic forecast for a continuous or discrete
outcome variable, with the forecast represented by a finite set of
samples drawn from the predictive distribution.nominal categorical forecast with unordered outcome possibilities
(generalisation of binary forecasts to multiple outcomes)The expected input format is generally a data.frame (or similar) with
required columns observed, and predicted that holds the forecasts
and observed values. Exact requirements depend on the forecast type. For
more information, have a look at the
paper,
call ?as_forecast_binary, ?as_forecast_quantile etc., or have a look
at the example data provided in the package (example_binary,
example_point, example_quantile, example_sample_continuous,
example_sample_discrete, example_nominal).
Before scoring, input data needs to be validated and transformed into a
forecast object using one of the as_forecast_<type>() functions.
forecast_quantile <- example_quantile |>
as_forecast_quantile(
forecast_unit = c(
"location", "forecast_date", "target_end_date", "target_type", "model", "horizon"
)
)
#> ℹ Some rows containing NA values may be removed. This is fine if not
#> unexpected.
print(forecast_quantile, 2)
#> Forecast type: quantile
#> Forecast unit:
#> location, forecast_date, target_end_date, target_type, model, and horizon
#>
#> Key: <location, target_end_date, target_type>
#> observed quantile_level predicted location forecast_date target_end_date
#> <num> <num> <int> <char> <Date> <Date>
#> 1: 127300 NA NA DE <NA> 2021-01-02
#> 2: 4534 NA NA DE <NA> 2021-01-02
#> ---
#> 20544: 78 0.975 611 IT 2021-07-12 2021-07-24
#> 20545: 78 0.990 719 IT 2021-07-12 2021-07-24
#> target_type model horizon
#> <char> <char> <num>
#> 1: Cases <NA> NA
#> 2: Deaths <NA> NA
#> ---
#> 20544: Deaths epiforecasts-EpiNow2 2
#> 20545: Deaths epiforecasts-EpiNow2 2
This is the beginning of the README. Read the rest at the original. Read the full README ↗