thuml / Autoformer

About Code release for "Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting" (NeurIPS 2021), https://arxiv.org/abs/2106.13008
MIT License
2k stars 429 forks source link

Handling of missing data and Temporal embedding #90

Closed vaseline555 closed 2 years ago

vaseline555 commented 2 years ago

Hi, I enjoyed reading your work.

I am wondering about the handling of missing samples. Usually, when we have missing points in temporal dataset, we have to interpolate them with a proper method.

Though in Autoformer, an explicit indicator of the temporal information (i.e., timestamp) is injected to the model in the form of temporal embedding.

In this case, even if we have missing time points, do we have to impute them? I think the imputation for Autoformer is not mandatory as the model knows when each sample is collected.

Hope to get answers about this. Thank you!

Best, Adam

wuhaixu2016 commented 2 years ago

I think you have two choices. (1) Directly apply Autoformer without imputation. As you mentioned, the temporal embedding will promote the model to impute the missing data implicitly. (2) Adopt Autoformer as an imputation model. You can firstly adopt the Autoformer to provide an initial value for the missing data. And then adopt Autoformer again to the imputed data for forecasting.

vaseline555 commented 2 years ago

Thank you for your answer. You mean, just adopting (1) without explicit imputation is a legit choice, right? Thank you!