Description Usage Arguments Value Examples
View source: R/META_apply_fforma_model.R
apply_fforma_model
is a function to apply the FFORMA meta model (which
has been trained using the train_fforma_model
function) to a set of
model forecasts comming from a single row of the main_forecasting_table.
1 2 3 4 5 6 | apply_fforma_model(
fc_models,
ts_object_train,
verbose = FALSE,
log_message = ""
)
|
ts_object_train |
A time series object, which contains only the training data. |
fc_errors |
A tibble with data on the fc errors for all the forecast models in fc_models. |
A tibble with data on the fc errors for all the forecast models in fc_models, which has been extended with the FFORMA meta model forecasts and fc errors.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ts_object_train <- tstools::initialize_ts_forecast_data(
data = dummy_gasprice,
date_col = "year_month",
col_of_interest = "gasprice",
group_cols = c("state", "oil_company"),
xreg_cols = c("spotprice", "gemprice")
) %>%
dplyr::filter(grouping == "state = New York & oil_company = CompanyA") %>%
tstools::transform_data_to_ts_object()
fc_models <- add_all_univariate_forecast_models(
ts_object_train = ts_object_train,
periods_ahead = 12,
verbose = T
)
apply_fforma_model(
ts_object_train = ts_object_train,
fc_models = fc_models
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.