MAZiqing / FEDformer

MIT License
641 stars 122 forks source link

About pred_len at training and pred_len at inference #59

Closed somaonishi closed 1 year ago

somaonishi commented 1 year ago

Can I use a different value for pred_len at inference than pred_len at training?

I think it is not possible because your code uses AvgPool1d for decomp, is this correct?

tianzhou2011 commented 1 year ago

why do you need to use a different value for pred_len at inference than at training? If you need few prediction points, just keep the horizon you want to get and throw the rest. If you want more, then yes, you have to train a model for longer output.

On Thu, May 18, 2023 at 9:47 AM SOMA ONISHI @.***> wrote:

Can I use a different value for pred_len at inference than pred_len at training?

I think it is not possible because your code uses AvgPool1d for decomp, is this correct?

— Reply to this email directly, view it on GitHub https://github.com/MAZiqing/FEDformer/issues/59, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3JGOZFBPH4Z6UJ6KFKOQTXGV5SRANCNFSM6AAAAAAYF2325A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

somaonishi commented 1 year ago

I needed fewer prediction points. You are right, I should keep only the predictor points that I need, but I would like to save computational resources during inference as much as possible. On the other hand, I think that a larger pred_len during training would improve the generalizability of the model.

This is why I asked this question.

tianzhou2011 commented 1 year ago

Indeed, there is a possibility that a larger prediction length during training could enhance the generalization to some extent. Although the improvement may not be significant, our experiments demonstrate some marginal gains with a longer prediction length of 192 points; where the mean squared error of the first 96 points is slightly lower compared to using 96 as the prediction length. But we didn't include this in the appendix.