Open uomodellamansarda opened 1 year ago
Hi @uomodellamansarda,
Darts adaptation of NBEATS to support covariates consists (roughly) in slicing the timeseries (align the time indices), creating a single tensor containing all the values of shape (input_chunk_length, k, 1)
where k = 1 + len(X.columns)
before flattening it into (1, k*input_chunk_length, 1)` (this correspond to a single sample, several of them can be combined to create a batch) and passing it through the NBEATS stacks. The output is then reshaped to retain only the forecasts of the target.
It should not be too difficult to bring the NBEATSx improvements to the current implementation, by adding a stack dedicated to the covariates (as described in the paper). WDYT @dennisbader ?
Thanks for the quick reply, very interesting!
I am quite new and I am still trying to understand how NBEATS is handling exogenous variables, I know the architecture is not designed for that, and this issue is overcome in NBEATx
How are handled in Darts NBEATS version external variables/covariates?
Are you planning to implement NBEATSx? Here NBEATSx Paper: https://arxiv.org/pdf/2104.05522.pdf) Here a Python implementation: https://github.com/cchallu/nbeatsx/blob/main/nbeatsx_example.ipynb