Nixtla / statsforecast

Lightning ⚡️ fast forecasting with statistical and econometric models.
https://nixtlaverse.nixtla.io/statsforecast
Apache License 2.0
3.85k stars 268 forks source link

[mstl_decomposition] add exogenous features support #884

Open JustM57 opened 1 month ago

JustM57 commented 1 month ago

Description

I'm seasonal decomposition as a features for next level model(gbt). I pass MSTL based of AutoArima trend as a model. So both models support exogenous features.

Use case

This can make decomposition more accurate as it may help to clear trend and seasonal components from for example holidays effect. Year seasonality may be the solution, but not enough trustful data available.

jmoralez commented 3 weeks ago

Hey, thanks for using statsforecast. The decomposition will be the same for training, regardless of the presence of exogenous features, so adding this would only change the trend component in the future features, is that what you expect? Also, would you like to keep the features for the next stage or just the decomposition (i.e. should the future dataframe have your original features from X_df or just trend + seasonal)?

JustM57 commented 3 weeks ago

Usually working with the second level models, features might be processed in the other way. So the answer whether to keep the features is no. Nevertheless tree based models unavailable to extrapolate trend in any way. So the idea is get the most accurate trend component from linear model(AR, NN, etc.). It is not possible without extra information we have from exogenous features. Thanks.