salesforce / CoST

PyTorch code for CoST: Contrastive Learning of Disentangled Seasonal-Trend Representations for Time Series Forecasting (ICLR 2022)
BSD 3-Clause "New" or "Revised" License
215 stars 43 forks source link

different window offset for x_q, x_k #8

Closed inspirit closed 2 years ago

inspirit commented 2 years ago

Hello, it seems like x_q and x_k will have different sequence data because of different window offset, does it make sense to learn representations using data from different time frames? https://github.com/salesforce/CoST/blob/3c4e76545040d093cc6d8156b3b92b6bfc924dd1/cost.py#L292-L297

gorold commented 2 years ago

Hi, this kind of offset should be fine, and has been used as a data augmentation strategy in other time-series representation learning methods. For our codebase, the length of x_q and x_k are typically close to max_train_length, so the offset is not large. That being said, we did not intend to include this type of offset and have removed it with the latest commit, thanks for spotting this! We've also re-run the experiments for the main table and results still remain (roughly, within 1 std.) the same.