business-science / modeltime.ensemble

Time Series Ensemble Forecasting
https://business-science.github.io/modeltime.ensemble/
Other
73 stars 16 forks source link

Add option to keep submodel forecasts after creating ensemble #3

Open tonyk7440 opened 3 years ago

tonyk7440 commented 3 years ago

Is there an option to also keep the submodel forecasts in the output when forecasting using an ensemble?

At the moment I'm currently doing something like

# Put both the submodels and ensemble into the table
ensemble_tbl <- submodel_table %>% 
  add_modeltime_model(ensemble_fit_glmnet)

It works, but is pretty much duplicating the whole forecasting time duration.

I had a look through this repos modeltime_forecast function and I see the forecasts are made but not kept, I was thinking of adding a flag in those forecast functions to keep_submodel_forecasts, what do you think?