assemble_stacking_inputs: Assemble a data frame of inputs to stacking

Description Usage Arguments Value

View source: R/stacking-utils.R

Description

Assemble a data frame of inputs to stacking

Usage

1
2
3
assemble_stacking_inputs(regions, seasons = paste0(2010:2016, "-", 2011:2017),
  prediction_target, component_model_names, explanatory_variables,
  include_model_performance = FALSE, preds_path)

Arguments

regions

string with region: either "National" or in the format "Regionk" for k in 1, ..., 10

seasons

character vector specifying seasons for which to get predictions, "2011/2012" or "2011-2012" or "*" for all seasons

prediction_target

string with either "onset", "peak_week", "peak_inc", "ph1_inc", ..., "ph4_inc"

component_model_names

character vector with names of component models

explanatory_variables

character vector with names of explanatory variables to include for weights; a non-empty subset of "analysis_time_season_week", "kcde_model_confidence", "sarima_model_confidence", "weighted_ili"

include_model_performance

boolean; should measures of model performance be included in the return result? Generally, should be TRUE if we're getting inputs for model training and FALSE if we're just getting covariates to calculate model weights.

preds_path

path to directory with leave-one-season-out or test phase predictions from each component model. Predictions should be saved in files named like "kde-National-loso-predictions.rds"

Value

a data frame with covariates that model weights depend on (as specified by explanatory_variables) and possibly log scores from each component model


reichlab/2017-2018-cdc-flu-contest documentation built on May 24, 2019, 6:17 a.m.