cchallu / nbeatsx

MIT License
181 stars 45 forks source link

Number of stacks confusion #4

Closed MBelniak closed 2 years ago

MBelniak commented 2 years ago

Hi. Thanks for the amazing paper and architecture.

I was trying to find out how many stacks in a generic model you used and I noticed in your paper:

"The original NBEATS configuration includes only one generic stack with dozens of blocks, while our proposed model includes both the generic and exogenous stacks, with the order determined via data-driven hyperparameter tuning. We refer to this configuration as the NBEATSx-G model."

That confused me, because in the original NBEATS paper in a table listing N-BEATS-G hyperparameters (Table 18.) authors claim to have used 30 stacks with 1 block in each. Did you assume they had mismatched the numbers? To me, 30 blocks and 1 stack seems to be more reasonable as well.

Can you confirm that you used just 2 stacks (one generic, one exogenous)? Additionally, do you think it would make sense to add more stacks (idk what configuration would be best)?

Regards

kdgutier commented 2 years ago

Hi @MBelniak,

The selection of the depth of the network needs to accommodate the availability of the data. In our empirical findings, smaller networks tend to have a better performance on smaller datasets.

In case that you are interested in seeing the effect of the the depth in the network, in the hyperparameter search can be easily controlled by switching these lines: https://github.com/cchallu/nbeatsx/blob/main/src/hyperopt_nbeatsx.py#L60-L61

Greetings

MBelniak commented 2 years ago

BTW I've just realized that for NBeats-G it's the same whether we use 30 stacks with 1 block each or 1 stack with 30 blocks. The architecture stays the same :) So the only valid question is about your architecture and the configuration of stacks.

kdgutier commented 2 years ago

A good library to observe your model configuration is this: https://github.com/sksq96/pytorch-summary

MBelniak commented 2 years ago

Hi @kdgutier.

So i guess I just need to play around with the number of stacks, their order etc., like in the grid-search. Thanks.