Nixtla / mlforecast

Scalable machine 🤖 learning for time series forecasting.
https://nixtlaverse.nixtla.io/mlforecast
Apache License 2.0
894 stars 88 forks source link

How the training of global models realized? #440

Open kkckk1110 opened 1 week ago

kkckk1110 commented 1 week ago

Description

Hello, I am using mlforecast to train a global forecasting model and reaching an exciting performance. However, I have some questions about the training details of global models. Specifically, I am using XGBoost for forecasting. When training a global model, does the trainer automatically input the unique_id as additional features? Or, does it simply aggregate the data from different series and train on the whole dataset without any additional features? Thanks a lot for your attention.

Link

No response

jmoralez commented 1 week ago

Hey. The id isn't used as a feature unless you explicitly ask for it by setting static_features=[your_id_col]. The features that are used to train are the ones you define in the constructor: lags, lag transforms, date features. The id is just used to differentiate between the series to compute the features and apply local target transformations.