zhihanyue / ts2vec

A universal time series representation learning framework
MIT License
593 stars 143 forks source link

drop=padding in forecasting #15

Closed opsuisppn closed 2 years ago

opsuisppn commented 2 years ago

Hi,

Is there any reason you set drop to equal padding lengths for training in forecasting, but not for valid and test? This could train forecast function with complete history only.

https://github.com/yuezhihan/ts2vec/blob/12a737e6561878452fffb68c81c98d24628f274a/tasks/forecasting.py#L46

zhihanyue commented 2 years ago

Because for valid set and test set, the history is always complete (if padding <= T_train). Setting drop for training set makes the distribution of training consistent with valid and test.

Note that we only perform "encode" once for the whole data. Therefore only the first "padding" representations of the data are incomplete.