Nixtla / neuralforecast

Scalable and user friendly neural :brain: forecasting algorithms.
https://nixtlaverse.nixtla.io/neuralforecast
Apache License 2.0
3.07k stars 355 forks source link

Issues with N-BEATSx and N-HITSx component analysis #566

Closed sdmishra123 closed 1 year ago

sdmishra123 commented 1 year ago

Hello,

I was able to get the Level/Trend/Seasonal components for my model (NBEATS without exogs) using the link you shared, but I need help to get the components for my model (NBEATSx with exogs). I keep getting the error - "RuntimeError: maximum size for tensor at dimension 2 is 280, but the size is 336", when I run this line of code y_hat = nbeatsx.decompose(dataset=dataset).

I used the below links to generate the components.

https://github.com/Nixtla/neuralforecast/blob/main/nbs/models.nhits.ipynb https://github.com/Nixtla/neuralforecast/blob/main/nbs/models.nbeats.ipynb

In the below image, what does identity represent in N-BEATS? Why do I see seasonality in the trend component?

N-BEATS component Analysis

I have one more question, is there a way to get the feature importance for the exogenous variables used in the N-BEATSx and N-HITS model?

kdgutier commented 1 year ago

Hey @sdmishra123,

Thanks for using for trying out the NBEATS decomposition.

Regarding the RuntimeError: maximum size for tensor at dimension 2 is 280, but the size is 336

What does identity represent in NBEATS?

Why do I see seasonality in the trend component?

Is there a way to get the feature importance for the exogenous variables used in the N-BEATSx and N-HITS model?

sdmishra123 commented 1 year ago

Thanks a lot for your prompt reply! This was very helpful. I re-ran my model and generated the decomposition plot. It looks fine now.

kdgutier commented 1 year ago

Glad to help.