skforecast icon indicating copy to clipboard operation
skforecast copied to clipboard

Using skforecast with panel data

Open davidusb-geek opened this issue 11 months ago • 4 comments

Hi, I couldn't find any information about this type of problem so I opened this issue. I wish to use skforecast to forecast some panel data. This type of data is in the form: image

Is is possible? How could you approach this type of problem with skforecast?

davidusb-geek avatar Mar 21 '24 22:03 davidusb-geek

Hello @davidusb-geek

It looks like a multi-series problem, but some preprocessing needs to be done.

Could you describe the problem a little more, what are the target variables and what are the exogenous variables?

Thanks

JavierEscobarOrtiz avatar Mar 25 '24 07:03 JavierEscobarOrtiz

Hello @davidusb-geek

It looks like a multi-series problem, but some preprocessing needs to be done.

Could you describe the problem a little more, what are the target variables and what are the exogenous variables?

Thanks

The problem is exactly like in the image I posted. I have multiple time series instances (sometimes called samples), and each instance or sample has the same length with a timestamp. Well in my case the timestamp is already a DateTimeIndex so well fitted for skforecast. Then for each of these instances/samples I have features variables (var_0, var1, ...) and a target. All these variables are float, no NaN's. That's it. I want to forecast the target using the information from all the features.

davidusb-geek avatar Mar 26 '24 08:03 davidusb-geek

I see. In the current version it is not possible to face this problem, but in skforecast 0.12 (hopefully released in 2 weeks) the ForecasterAutoregMultiSeries will be able to handle this situation. I will come back to this issue when the release is ready.

JavierEscobarOrtiz avatar Mar 26 '24 08:03 JavierEscobarOrtiz

Great to hear that Javier. Kudos for all this nice work!

davidusb-geek avatar Mar 26 '24 09:03 davidusb-geek

Hello @davidusb-geek,

The functionality to include series-specific exogenous variables in ForecasterMultiSeries is now available in skforecast 0.12.0:

https://skforecast.org/latest/user_guides/multi-series-with-different-length-and-different_exog

We will improve the user guide in the coming days. 😄

Hope it helps!

JavierEscobarOrtiz avatar May 06 '24 07:05 JavierEscobarOrtiz