
Rebuild the rolling-CV predictions table from run directories
Source:R/run_rolling_cv.R
compile_rolling_cv_predictions.RdRegenerates predictions.parquet from the per-cutoff run_MOSAIC
directories under a run_rolling_cv() artifact (e.g. after adding a
cutoff or to add quantile columns), without recalibrating.
Usage
compile_rolling_cv_predictions(
dir_output,
base_config = MOSAIC::config_default,
models = NULL,
n_reps_best_medoid = NULL,
central_method = NULL,
write = TRUE
)Arguments
- dir_output
A
run_rolling_cv()output directory (must containmanifest.jsonandruns/); a manifest from an interrupted run (status = "running") compiles the cutoffs it records.- base_config
Config used to recover the held-out (unmasked) observed series (default
MOSAIC::config_default); must match the run config.- models
Character vector of model types to compile, from
"ensemble","ensemble_opt","best","medoid"; NULL (default) uses the set recorded in the run manifest.- n_reps_best_medoid
Integer or NULL (default); number of stochastic replicates to draw for the single-config
best/medoidmodels, with each cutoff run's observation model and deaths integration (seerun_rolling_cv). NULL reuses the value stored in the run manifest.- central_method
Central tendency for
pred_central:NULL(default) reuses the value recorded in the run manifest; a manifest without the field was written byrun_rolling_cv()beforecentral_methodexisted (v0.32.40-v0.37.x), when predictions were the ensemble median, so it recompiles on"median". Otherwise a scalar or per-channelc(cases=, deaths=)override.- write
Logical; write
predictions.parquet(default TRUE).