TFB
[PVLDB 2024 Best Paper Nomination] TFB: Towards Comprehensive and Fair Benchmarking of Time Series Forecasting Methods
Install / Use
/learn @decisionintelligence/TFBREADME
[!IMPORTANT] 1、If you find this project helpful, please don't forget to give it a ⭐ Star to show your support. Thank you!
2、We have retested the results of some algorithms, which may differ from those in the TFB paper. You can find the hyperparameters we ultimately selected for each algorithm on each dataset in the scripts folder, and their corresponding algorithm test results can be found on the OpenTS!
🚩 News (2025.06) We have also open-sourced the Time Series Anomaly Detection Benchmark (TAB) and Time Series Foundation Model Benchmark (TSFM-Bench).
🚩 News (2025.04) TFB has open-sourced the code for computing time series characteristics, such as trend, seasonality, stationarity, shifting, transition, correlation, and more. Both Chinese and English documentation are provided.
🚩 News (2025.04) DUET has released the results of a long-term forecasting task with unified hyperparameters, where the input length is fixed at 96 for all experiments. Click here to view the results, and click here to view the script for reproducing the results.
🚩 News (2025.04) TFB has added two new datasets: PEMS03 and PEMS07, bringing the total to 27 multivariate datasets.
🚩 News (2025.03) TFB has added a new practical feature: support for predicting only a subset of input variables. Both Chinese and English documentation are provided.
🚩 News (2025.03) We maintain a WeChat group to facilitate discussions about TFB and OpenTS.
🚩 News (2024.09) You can find detailed API documentation here.
🚩 News (2024.08) Introduction video (in Chinese): bilibili.
🚩 News (2024.08) TFB achieves 🌟Best Paper Nomination🌟 in PVLDB 2024.
🚩 News (2024.08) We have created a leaderboard for time series forecasting,called OpenTS-Bench.
🚩 News (2024.05) Some introduction (in Chinese): intro1, intro2, intro3, intro4, intro5, intro6, and intro7.
Newly added baselines. ☑ means that their codes have already been included into this repo, and their performance results have been included in the OpenTS-Bench leaderboard. ☒ means that just their codes have already been included into this repo.
-
[ ] TimeBridge - TimeBridge: Non-Stationarity Matters for Long-term Time Series Forecasting [ICML 2025], [Code].
-
[x] SparseTSF - SparseTSF: Modeling Long-term Time Series Forecasting with 1k Parameters [ICML 2024], [Code].
-
[x] TimeKAN - TimeKAN: KAN-based Frequency Decomposition Learning Architecture for Long-term Time Series Forecasting [ICLR 2025], [Code].
-
[x] xPatch - xPatch: Dual-Stream Time Series Forecasting with Exponential Seasonal-Trend Decomposition [AAAI 2025], [Code].
-
[x] HDMixer - HDMixer: Hierarchical Dependency with Extendable Patch for Multivariate Time Series Forecasting [AAAI 2024], [Code].
-
[x] PatchMLP - PatchMLP: Unlocking the Power of Patch: Patch-Based MLP for Long-Term Time Series Forecasting [AAAI 2025], [Code].
-
[x] Amplifier - Amplifier: Bringing Attention to Neglected Low-Energy Components in Time Series Forecasting [AAAI 2025], [Code].
-
[x] DUET - DUET: Dual Clustering Enhanced Multivariate Time Series Forecasting [KDD 2025], [Code].
-
[x] PDF - Periodicity Decoupling Framework for Long-term Series Forecasting [ICLR 2024], [Code].
-
[x] Pathformer - Pathformer: Multi-scale transformers with adaptive pathways for time series forecasting [ICLR 2024], [Code].
-
[x] FITS - FITS: Modeling Time Series with 10k Parameters [ICLR 2024], [Code].
Table of Contents
- Introduction
- Quickstart
- Steps to develop your own method
- Steps to evaluate on your own time series
- Time series code bug the drop-last illustration
- FAQ
- Citation
- Acknowledgement
- Contact
Introduction
TFB is an open-source library designed for time series forecasting researchers.
We provide a clean codebase for end-to-end evaluation of time series forecasting models, comparing their performance with baseline algorithms under various evaluation strategies and metrics.
The below figure provides a visual overview of TFB's pipeline.
<div align="center"> <img alt="Logo" src="docs/figures/Pipeline.png" width="80%"/> </div>The table below provides a visual overview of how TFB's key features compare to other libraries for time series forecasting.

Quickstart
[!IMPORTANT] this project is fully tested under python 3.8, it is recommended that you set the Python version to 3.8.
- Installation:
- From PyPI
Given a python environment (note: this project is fully tested under python 3.8), install the dependencies with the following command:
pip install -r requirements.txt
[!IMPORTANT] If you want to reproduce the results from scripts, please use the
requirements-docker.txtfile instead ofrequirements.txt. This is becauserequirements-docker.txtlocks the versions of the packages, whilerequirements.txtprovides version ranges, which may result in different dependency versions and affect the accuracy of the reproduction.pip install -r requirements-docker.txt
- From Docker
We also provide a Dockerfile for you. For this setup to work you need to have a Docker service installed. You can get it at Docker website.
docker build . -t tfb:latest
docker run -it -v $(pwd)/:/app/ tfb:latest bash
- Data preparation:
You can obtained the well pre-processed datasets from Google Drive or [Baidu Drive](htt
