File size: 3,033 Bytes
4d5cbab b071939 d1c595b b071939 5e03218 b071939 489d293 5e03218 b071939 5e03218 b071939 5e03218 b071939 5e03218 b071939 489d293 5e03218 b071939 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
---
license: apache-2.0
datasets:
- ETDataset/ett
language:
- en
metrics:
- mse
- mae
library_name: transformers
pipeline_tag: time-series-forecasting
tags:
- Time-series
- foundation-model
- forecasting
---
# TEMPO: Prompt-based Generative Pre-trained Transformer for Time Series Forecasting
The official code for ICLR 2024 paper: "TEMPO: Prompt-based Generative Pre-trained Transformer for Time Series Forecasting (ICLR 2024)".
TEMPO is one of the very first open source **Time Series Foundation Models** for forecasting task v1.0 version.
![TEMPO-architecture](pics/TEMPO.png)
Please try our foundation model demo [[here]](https://4171a8a7484b3e9148.gradio.live).
![TEMPO-demo](pics/TEMPO_demo.jpg)
# Build the environment
```
conda create -n tempo python=3.8
```
```
conda activate tempo
```
```
pip install -r requirements.txt
```
# Get Data
Download the data from [[Google Drive]](https://drive.google.com/drive/folders/13Cg1KYOlzM5C7K8gK8NfC-F3EYxkM3D2?usp=sharing) or [[Baidu Drive]](https://pan.baidu.com/s/1r3KhGd0Q9PJIUZdfEYoymg?pwd=i9iy), and place the downloaded data in the folder`./dataset`. You can also download the STL results from [[Google Drive]](https://drive.google.com/file/d/1gWliIGDDSi2itUAvYaRgACru18j753Kw/view?usp=sharing), and place the downloaded data in the folder`./stl`.
# Run TEMPO
## Training Stage
```
bash [ecl, etth1, etth2, ettm1, ettm2, traffic, weather].sh
```
## Test
After training, we can test TEMPO model under the zero-shot setting:
```
bash [ecl, etth1, etth2, ettm1, ettm2, traffic, weather]_test.sh
```
![TEMPO-results](pics/results.jpg)
# Pre-trained Models
You can download the pre-trained model from [[Google Drive]](https://drive.google.com/file/d/11Ho_seP9NGh-lQCyBkvQhAQFy_3XVwKp/view?usp=drive_link) and then run the test script for fun.
# Multi-modality dataset: TETS dataset
Here is the prompts use to generate the coresponding textual informaton of time series via [[OPENAI ChatGPT-3.5 API]](https://platform.openai.com/docs/guides/text-generation)
![TEMPO-prompt](pics/TETS_prompt.png)
The time series data are come from [[S&P 500]](https://www.spglobal.com/spdji/en/indices/equity/sp-500/#overview). Here is the EBITDA case for one company from the dataset:
![Company1_ebitda_summary](pics/Company1_ebitda_summary.png)
Example of generated contextual information for the Company marked above:
![Company1_ebitda_summary_words.jpg](pics/Company1_ebitda_summary_words.jpg)
You can download the processed data with text embedding from GPT2 from: [[TETS]](https://drive.google.com/file/d/1Hu2KFj0kp4kIIpjbss2ciLCV_KiBreoJ/view?usp=drive_link
).
## Cite
```
@inproceedings{
cao2024tempo,
title={{TEMPO}: Prompt-based Generative Pre-trained Transformer for Time Series Forecasting},
author={Defu Cao and Furong Jia and Sercan O Arik and Tomas Pfister and Yixiang Zheng and Wen Ye and Yan Liu},
booktitle={The Twelfth International Conference on Learning Representations},
year={2024},
url={https://openreview.net/forum?id=YH5w12OUuU}
}
``` |