LTSF is a Python 🐍 package that simplifies the process of implementing and testing various state-of-the-art models 🧠 for long-term time-series forecasting 📈. This package supports the majority of current leading baselines, offering a user-friendly interface to perform LTSF tasks effortlessly.
LTSF enables users to employ their desired model with a single-line configuration and provides the tools 🛠️ to create training, validation, and testing datasets effortlessly. By further utilizing LTSF's training interface, users can train and test their models using only a few lines of code.
The table below shows the supported baselines with their corresponding references and links to their original implementation:
Baseline | Reference | Code |
---|---|---|
PatchTST | ICLR 2023 | PatchTST |
MICN | ICLR 2023 | MICN |
FiLM | NIPS 2022 | FiLM |
TimesNet | ICLR 2023 | TimesNet |
Crossformer | ICLR 2023 | Crossformer |
DLinear | AAAI 2023 | DLinear |
LightTS | arXiv 2022 | LightTS |
ETSformer | arXiv 2022 | ETSformer |
Non-stationary Transformer | NeurIPS 2022 | Non-stationary Transformer |
FEDformer | ICML 2022 | FEDformer |
Pyraformer | ICLR 2022 | Pyraformer |
Autoformer | NeurIPS 2021 | Autoformer |
Informer | AAAI 2021 | Informer |
Reformer | ICLR 2020 | Reformer |
Transformer | NeurIPS 2017 | Transformer |
Here is an example of how you can use LTSF:
pip install ltsf
import ltsf
# Create a configuration for your desired model and dataset
config = ltsf.Config("Autoformer", "ETTh1")
# Set your custom configuration
config.set_config({"use_gpu":False})
# Create training, validation, and testing datasets
train_loader, val_loader, test_loader = ltsf.DatasetFactory.create(config, download=True, data_path=".")
# Create an LTSFTrainer
trainer = ltsf.LTSFTrainer(config)
# Start the training process
trainer.train(train_loader, val_loader, test_loader)
# Test the trained model
trainer.test(test_loader, res_dir="./result")
- Supports 15 leading baselines for long-term time-series forecasting.
- User-friendly, enabling model training and testing with minimal lines of code.
- [2023-06-21] LTSF has now been released! 🚀
- Planning to support more intelligent parameter settings for improved usability and flexibility.
- Support custom dataset.
We are grateful to the authors of all the papers and their original implementations that made this package possible.