006-a-time-series-is-worth-64-words-long-term-forecasting-with-transformers

https://github.com/szu-advtech-2023/006-a-time-series-is-worth-64-words-long-term-forecasting-with-transformers

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.2%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: SZU-AdvTech-2023
  • Language: Python
  • Default Branch: main
  • Size: 163 MB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 2 years ago · Last pushed over 2 years ago
Metadata Files
Readme Citation

README.md

Time Series Library (TSlib)

TSlib is an open-source library for deep learning researchers, especially for deep time series analysis.

We provide a neat code base to evaluate advanced deep time series models or develop your model, which covers five mainstream tasks: long- and short-term forecasting, imputation, anomaly detection, and classification.

:triangularflagon_post:News (2023.10) We add an implementation to iTransformer, which is the state-of-the-art model for long-term forecasting. The official code and complete scripts of iTransformer can be found here.

:triangularflagon_post:News (2023.09) We added a detailed tutorial for TimesNet and this library, which is quite friendly to beginners of deep time series analysis.

Leaderboard for Time Series Analysis

Till October 2023, the top three models for five different tasks are:

| Model
Ranking | Long-term
Forecasting | Short-term
Forecasting | Imputation | Anomaly
Detection | Classification | | ---------------- |---------------------------------------------------| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -------------------------------------------------- | | 1st | iTransformer | TimesNet | TimesNet | TimesNet | TimesNet | | 2nd | PatchTST | Non-stationary
Transformer
| Non-stationary
Transformer
| Non-stationary
Transformer
| FEDformer | | 3rd | TimesNet | FEDformer | Autoformer | Informer | Autoformer |

Note: We will keep updating this leaderboard. If you have proposed advanced and awesome models, you can send us your paper/code link or raise a pull request. We will add them to this repo and update the leaderboard as soon as possible.

Compared models of this leaderboard. means that their codes have already been included in this repo. - [x] iTransformer - iTransformer: Inverted Transformers Are Effective for Time Series Forecasting [arXiv 2023] [Code]. - [x] PatchTST - A Time Series is Worth 64 Words: Long-term Forecasting with Transformers [ICLR 2023] [Code]. - [x] TimesNet - TimesNet: Temporal 2D-Variation Modeling for General Time Series Analysis [ICLR 2023] [Code] [ICLR 2024] [Code]. - [x] DLinear - Are Transformers Effective for Time Series Forecasting? [AAAI 2023] [Code]. - [x] LightTS - Less Is More: Fast Multivariate Time Series Forecasting with Light Sampling-oriented MLP Structures [arXiv 2022] [Code]. - [x] ETSformer - ETSformer: Exponential Smoothing Transformers for Time-series Forecasting [arXiv 2022] [Code]. - [x] Non-stationary Transformer - Non-stationary Transformers: Exploring the Stationarity in Time Series Forecasting [NeurIPS 2022] [Code]. - [x] FEDformer - FEDformer: Frequency Enhanced Decomposed Transformer for Long-term Series Forecasting [ICML 2022] [Code]. - [x] Pyraformer - Pyraformer: Low-complexity Pyramidal Attention for Long-range Time Series Modeling and Forecasting [ICLR 2022] [Code]. - [x] Autoformer - Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting [NeurIPS 2021] [Code]. - [x] Informer - Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting [AAAI 2021] [Code]. - [x] Reformer - Reformer: The Efficient Transformer [ICLR 2020] [Code]. - [x] Transformer - Attention is All You Need [NeurIPS 2017] [Code].

See our latest paper [TimesNet] for the comprehensive benchmark. We will release a real-time updated online version soon.

Newly added baselines. We will add them to the leaderboard after a comprehensive evaluation. - [x] Koopa - Koopa: Learning Non-stationary Time Series Dynamics with Koopman Predictors [NeurIPS 2023] [Code]. - [x] FiLM - FiLM: Frequency improved Legendre Memory Model for Long-term Time Series Forecasting [NeurIPS 2022][Code]. - [x] MICN - MICN: Multi-scale Local and Global Context Modeling for Long-term Series Forecasting [ICLR 2023][Code]. - [x] Crossformer - Crossformer: Transformer Utilizing Cross-Dimension Dependency for Multivariate Time Series Forecasting [ICLR 2023][Code].

Usage

  1. Install Python 3.8. For convenience, execute the following command.

pip install -r requirements.txt

  1. Prepare Data. You can obtain the well pre-processed datasets from [Google Drive] or[Baidu Drive], Then place the downloaded data in the folder./dataset. Here is a summary of supported datasets.

  1. Train and evaluate model. We provide the experiment scripts for all benchmarks under the folder ./scripts/. You can reproduce the experiment results as the following examples:

```

long-term forecast

bash ./scripts/longtermforecast/ETTscript/TimesNetETTh1.sh

short-term forecast

bash ./scripts/shorttermforecast/TimesNet_M4.sh

imputation

bash ./scripts/imputation/ETTscript/TimesNetETTh1.sh

anomaly detection

bash ./scripts/anomaly_detection/PSM/TimesNet.sh

classification

bash ./scripts/classification/TimesNet.sh ```

  1. Develop your own model.
  • Add the model file to the folder ./models. You can follow the ./models/Transformer.py.
  • Include the newly added model in the Exp_Basic.model_dict of ./exp/exp_basic.py.
  • Create the corresponding scripts under the folder ./scripts.

Citation

If you find this repo useful, please cite our paper.

@inproceedings{wu2023timesnet, title={TimesNet: Temporal 2D-Variation Modeling for General Time Series Analysis}, author={Haixu Wu and Tengge Hu and Yong Liu and Hang Zhou and Jianmin Wang and Mingsheng Long}, booktitle={International Conference on Learning Representations}, year={2023}, }

Contact

If you have any questions or suggestions, feel free to contact:

  • Haixu Wu (wuhx23@mails.tsinghua.edu.cn)
  • Tengge Hu (htg21@mails.tsinghua.edu.cn)
  • Haoran Zhang (z-hr20@mails.tsinghua.edu.cn)
  • Jiawei Guo (guo-jw21@mails.tsinghua.edu.cn)

Or describe it in Issues.

Acknowledgement

This project is supported by the National Key R&D Program of China (2021YFB1715200).

This library is constructed based on the following repos:

  • Forecasting: https://github.com/thuml/Autoformer.

  • Anomaly Detection: https://github.com/thuml/Anomaly-Transformer.

  • Classification: https://github.com/thuml/Flowformer.

All the experiment datasets are public, and we obtain them from the following links:

  • Long-term Forecasting and Imputation: https://github.com/thuml/Autoformer.

  • Short-term Forecasting: https://github.com/ServiceNow/N-BEATS.

  • Anomaly Detection: https://github.com/thuml/Anomaly-Transformer.

  • Classification: https://www.timeseriesclassification.com/.

All Thanks To Our Contributors

Owner

  • Name: SZU-AdvTech-2023
  • Login: SZU-AdvTech-2023
  • Kind: organization

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2