Busabase
Busabase는 AI 에이전트를 위한 오픈소스(MIT) 데이터베이스 및 작업 공간입니다
data.table 기반 편리한 프레임워크로 예측을 평가하고, 예측 확인·문제 진단·예측·누락 데이터 시각화를 지원합니다
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온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
Utilities for Scoring and Assessing Predictions
README 전체를 불러오는 중입니다.
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
여기까지가 README 앞부분입니다. 나머지는 원문에서 읽을 수 있습니다. README 전문 보기 ↗