Nixtla / mlforecast

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

mlforecast: can the number of exogenous variables be different for different unique_id? #303

Closed ahbon123 closed 7 months ago

ahbon123 commented 8 months ago

Description

Hello, I want to use nixtla mlforecast for prediction. My question is if the number of exogenous variables could be different for different unique_id? My training data may look like this: For BE and CB, the number of their exogenous variables is different.

unique_id   ds  y   Exogenous1  Exogenous2  day_0   day_1   day_2   day_3   day_4   day_5   day_6
0   BE  2016-12-01 00:00:00 72.00   61507.0 71066.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0
1   BE  2016-12-01 01:00:00 65.80   59528.0 67311.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0
2   BE  2016-12-01 02:00:00 59.99   58812.0 67470.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0
3   CB  2016-12-01 03:00:00 50.69   57676.0
4   CB  2016-12-01 04:00:00 52.58   56804.0

Thanks for your attention.

Use case

No response

jmoralez commented 8 months ago

Hey @ahbon123, thanks for using mlforecast. The models are trained using all of the series, so it depends on what you want to do, you could for example fill the missing features with NaNs and let the model handle them or split them and model them separately.

github-actions[bot] commented 7 months ago

This issue has been automatically closed because it has been awaiting a response for too long. When you have time to to work with the maintainers to resolve this issue, please post a new comment and it will be re-opened. If the issue has been locked for editing by the time you return to it, please open a new issue and reference this one.