View source: R/model_eligibility.R
calc_model_eligibility_for_ensemble | R Documentation |
Generate a data frame with a row for each model and an indicator of whether that model is eligible for inclusion in an ensemble, with explanation if not
calc_model_eligibility_for_ensemble(
qfm,
observed_by_location_target_end_date,
missingness_by_target = FALSE,
do_q10_check = TRUE,
do_nondecreasing_quantile_check = TRUE,
do_baseline_check = FALSE,
do_sd_check = "exclude_none",
sd_check_table_path = NULL,
sd_check_plot_path = NULL,
window_size = 0,
decrease_tol = 1,
baseline_tol = 1.2
)
qfm |
matrix of model forecasts of class QuantileForecastMatrix |
observed_by_location_target_end_date |
data frame of observed values |
missingness_by_target |
logical; if TRUE, check condition that forecasts are not missing for each combination of model, week, and target; otherwise, |
do_q10_check |
logical; if TRUE, check condition that quantile at level 0.1 is at least as large as the most recent observed value |
do_nondecreasing_quantile_check |
logical; if TRUE, check condition that quantiles for consecutive targets (1 wk ahead, 2 wk ahead, etc) are non-decreasing for each combination of location, forecast_week_end_date, model, and quantile probability level |
do_baseline_check |
logical; if TRUE, check condition that WIS for model is within specified tolerance of WIS for baseline |
do_sd_check |
character: "exclude_none" to keep all forecasts, "exclude_below" to exclude low forecasts, "exclude_above" to exclude high forecasts, or "exclude_both" to exclude both low and high forecasts. exclusions are based on a check of whether the mean of the next (7) predicted medians is not more than (4) sample standard deviations abov or below the mean of the last (14) observations |
window_size |
non-negative integer number of historic weeks that are examined for forecast missingness; 0 is appropriate for equal weight ensembles where no historical data is required. If two past weeks of forecast data are required to estimate ensemble parameters, window_size should be 2 |
decrease_tol |
numeric; decreases of up to specified tolerance are allowed |
baseline_tol |
numeric; for baseline check, model's mean WIS for forecasts within the window size must be at most baseline_tol times the mean wis for the baseline model on the corresponding forecasts |
data frame with two columns:
one with name given by model_id_name recording model id for each model
a second called 'eligibility' that is either the string 'eligible' or a brief description of why the model can't be included
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.