neuralforecast icon indicating copy to clipboard operation
neuralforecast copied to clipboard

DLinear with exogenous variables?

Open candalfigomoro opened this issue 1 year ago • 1 comments

Description

The original implementation of DLinear (and NLinear) does not support exogenous variables. In one publication (can't remember which one) I read that DLinear does not support them because it would worsen its performance, but in the original article I don't seem to see mention of this.

However, there are implementations of DLinear with support for exogenous variables, for example:

  • https://github.com/ChenXuanting/DLinearWithExogenousVariables
  • Darts https://unit8co.github.io/darts/generated_api/darts.models.forecasting.dlinear.html

(it seems to me that support for exogenous variables in these two libraries is added a bit differently)

Do you think it might make sense to create a "DLinearx" (and NLinearx) class with Darts-style support for exogenous variables (historical, future, static)? @elephaint Opinions?

Use case

I think DLinear could be useful where a fast and simple model is needed (even more so than TiDE), but the lack of support for exogenous variables is quite crippling.

candalfigomoro avatar May 07 '24 08:05 candalfigomoro

Pro implementing it:

  • It's easy to implement (but hard to get it right)

Against:

  • Performance will likely not be that good, simply because adding exogenous properly is quite hard (see TSMixerx vs TSMixer, it commonly requires a big structural change to the original architecture).
  • Not convinced (yet) of the benefit over other simple, fast models such as NHITS, TSMixerx, BiTCN, and TiDE that offer exogenous too.

I don't know yet, but open to be convinced for either side.

Personally, I think the library would benefit greatly from a 'how to choose a model'-section where we simply steer users away from models such as DLinear if they require exogenous (this is something that is on my long-term todo list....).

elephaint avatar May 07 '24 13:05 elephaint