Evaluates fable models by expanding-window time-series
cross-validation: from eval_start_date, models are refit at each
origin and forecast h steps ahead, then scored by weighted interval
score (WIS) and interval coverage via hubEvals. The ranking is
reused by get_fcast.
Usage
get_cv(x, eval_start_date, h = 4, models = default_models(), step = h)Arguments
- x
An
accidda_ncast(get_ncast) oraccidda_data(check_data/get_data).- eval_start_date
Date (or string coercible to one). First origin evaluated; must lie within the data window. All observations before it form the initial training window.
- h
Integer. Forecast horizon, in reporting-interval steps (weeks for weekly data, days for daily). Default 4.
- models
Named list of
fablemodels. Defaults todefault_models; compose withc(default_models(), list(...))to extend. Each element must referenceobservation. See the fabletools extension vignette for custom models.- step
Integer. Number of reporting-interval steps the training window advances between successive CV origins. Defaults to
h(non-overlapping evaluation blocks).
Value
An accidda_cv object:
- forecasts
Per-origin, per-model forecasts (
model_out_tbl).- oracle
Observed truth (
oracle_output).- score
Model ranking by WIS with interval coverage.
- models
The evaluated model specifications.
- meta
eval_start_date,h,location,target,interval.- data
Revision-collapsed input, reused by
get_fcast.
