set_agnostic_max_h: Set maximal horizon for h-agnostic models

Description Usage Arguments Details Value Examples

View source: R/list_misc.R

Description

set_agnostic_max_h sets maximal horizon for h-agnostic models.

Usage

1
set_agnostic_max_h(fits_long, ignored_vars = "model_filename")

Arguments

fits_long

list of models to estimate

ignored_vars

names of variables that are ignored when set_agnostic_max_h groups rows correponding to same model.

Details

There are two types of models. Horizon agnostic that do not require horizon h for estimation (ARIMA, RW, ETS...). Horizon gnostic models that require h both for estimation and forecasting (cross validated VAR-lasso, ...). This function removes redundant estimation of h-agnostic models. If one requires estimation of h-agnostic model for h = 1, h = 2, h = 3 this function will leave only estimation of h = 3 in the request. List of models to estimate should contain at least

All other variables except ignored_vars are used to identify whether models are different.

Value

shorter list of models to estimate

Examples

1
2
3
fits_long <- tibble::tibble(h_required = c(TRUE, TRUE, FALSE, FALSE, FALSE),
   h = c(1, 2, 1, 2, 3), params = c(1, 1, 2, 2, 5))
set_agnostic_max_h(fits_long)

bdemeshev/torro documentation built on May 21, 2019, 8:36 a.m.