View source: R/scoreForecast.R
| score_batches | R Documentation |
Recursively finds every asof_week*/epifilter_forecast_next_week.csv
under root_dir and matches each batch's one-week-ahead forecast to
the actual case count once it appears as an observed row in a later
batch's epifilter_results.csv - i.e. this scores genuine
prospective (not in-sample) forecast performance over time.
score_batches(root_dir, revision = c("first", "latest"))
root_dir |
path under which to search recursively for asof_week*
folders (e.g. |
revision |
|
Surveillance case counts are commonly revised between runs as reporting
catches up (backfill), so the same (location, time) can legitimately
have different case counts across different asof_week batches. This
function makes that choice explicit via revision: "first"
uses the count as it was first reported (matches classic prospective
forecast evaluation); "latest" uses the most complete/least
revised count available.
This function is a filesystem helper for scoring output produced by the
standalone run_rtforecast.R script's weekly batch folders. If
you're using rt_forecast() directly in R (recommended for new code),
accumulate a data.frame of your own forecasts/actuals across weeks and
use mae(), coverage(), and wis() directly instead.
a data.frame, one row per batch whose forecast has since been realized, with location, time, forecast, actual, and per-point MAE/coverage (95% and 50%) columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.