business-science / modeltime.ensemble

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

refit submodels before fitting resamples #19

Closed regisely closed 2 years ago

regisely commented 2 years ago

When making final predictions for a stacking ensemble, all submodels need to be refitted on full dataset before calling modeltime_fit_resamples, otherwise the stacking ensemble predictions obtained with modeltime_refit will be problematic, especially if there is a trend in the time series.

I don't know if this commit is the best solution to the problem, but it seems to be a simple imediate solution. I have made this gist to illustrate the problem: https://gist.github.com/regisely/435d4a2d444c44bd83bb8669d163f4f9

mdancho84 commented 2 years ago

Thanks a lot for this. I'm looking into. I'm getting ready for an update. Will revert back.