wmgifford nielsr HF staff commited on
Commit
57adb20
1 Parent(s): 1212736

Add model card (#2)

Browse files

- Add model card (3ab7acdccbc470523b41303031d6584c75c40845)


Co-authored-by: Niels Rogge <[email protected]>

Files changed (1) hide show
  1. README.md +78 -0
README.md ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - generated_from_trainer
4
+ - time series
5
+ - forecasting
6
+ - pretrained models
7
+ - foundation models
8
+ - time series foundation models
9
+ - time-series
10
+ license: apache-2.0
11
+ pipeline_tag: time-series-forecasting
12
+ model-index:
13
+ - name: patchtst_etth1_forecast
14
+ results: []
15
+ ---
16
+
17
+ # PatchTST model pre-trained on ETTh1 dataset
18
+
19
+ <!-- Provide a quick summary of what the model is/does. -->
20
+
21
+ [`PatchTST`](https://huggingface.co/docs/transformers/model_doc/patchtst) is a transformer-based model for time series modeling tasks, including forecasting, regression, and classification. This repository contains a pre-trained `PatchTST` model encompassing all seven channels of the `ETTh1` dataset.
22
+ This particular pre-trained model produces a Mean Squared Error (MSE) of 0.3881 on the `test` split of the `ETTh1` dataset when forecasting 96 hours into the future with a historical data window of 512 hours.
23
+
24
+ For training and evaluating a `PatchTST` model, you can refer to this [demo notebook](https://github.com/IBM/tsfm/blob/main/notebooks/hfdemo/patch_tst_getting_started.ipynb).
25
+
26
+ ## Model Details
27
+
28
+ ### Model Description
29
+
30
+ The `PatchTST` model was proposed in A Time Series is Worth [64 Words: Long-term Forecasting with Transformers](https://arxiv.org/abs/2211.14730) by Yuqi Nie, Nam H. Nguyen, Phanwadee Sinthong, Jayant Kalagnanam.
31
+
32
+ At a high level the model vectorizes time series into patches of a given size and encodes the resulting sequence of vectors via a Transformer that then outputs the prediction length forecast via an appropriate head.
33
+
34
+ The model is based on two key components: (i) segmentation of time series into subseries-level patches which are served as input tokens to Transformer; (ii) channel-independence where each channel contains a single univariate time series that shares the same embedding and Transformer weights across all the series. The patching design naturally has three-fold benefit: local semantic information is retained in the embedding; computation and memory usage of the attention maps are quadratically reduced given the same look-back window; and the model can attend longer history. Our channel-independent patch time series Transformer (PatchTST) can improve the long-term forecasting accuracy significantly when compared with that of SOTA Transformer-based models.
35
+
36
+ In addition, PatchTST has a modular design to seamlessly support masked time series pre-training as well as direct time series forecasting, classification, and regression.
37
+
38
+ <img src="patchtst_architecture.png" alt="Architecture" width="600" />
39
+
40
+ ### Model Sources
41
+
42
+ <!-- Provide the basic links for the model. -->
43
+
44
+ - **Repository:** [PatchTST Hugging Face](https://huggingface.co/docs/transformers/model_doc/patchtst)
45
+ - **Paper:** [PatchTST ICLR 2023 paper](https://dl.acm.org/doi/abs/10.1145/3580305.3599533)
46
+ - **Demo:** [Get started with PatchTST](https://github.com/IBM/tsfm/blob/main/notebooks/hfdemo/patch_tst_getting_started.ipynb)
47
+
48
+ ## Uses
49
+
50
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
51
+ This pre-trained model can be employed for fine-tuning or evaluation using any Electrical Transformer dataset that has the same channels as the `ETTh1` dataset, specifically: `HUFL, HULL, MUFL, MULL, LUFL, LULL, OT`. The model is designed to predict the next 96 hours based on the input values from the preceding 512 hours. It is crucial to normalize the data. For a more comprehensive understanding of data pre-processing, please consult the paper or the demo.
52
+
53
+ ## How to Get Started with the Model
54
+
55
+ Use the code below to get started with the model.
56
+
57
+ [Demo](https://github.com/IBM/tsfm/blob/main/notebooks/hfdemo/patch_tst_getting_started.ipynb)
58
+
59
+ ## Citation
60
+
61
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
62
+
63
+ **BibTeX:**
64
+ ```
65
+ @misc{nie2023time,
66
+ title={A Time Series is Worth 64 Words: Long-term Forecasting with Transformers},
67
+ author={Yuqi Nie and Nam H. Nguyen and Phanwadee Sinthong and Jayant Kalagnanam},
68
+ year={2023},
69
+ eprint={2211.14730},
70
+ archivePrefix={arXiv},
71
+ primaryClass={cs.LG}
72
+ }
73
+ ```
74
+
75
+ **APA:**
76
+ ```
77
+ Nie, Y., Nguyen, N., Sinthong, P., & Kalagnanam, J. (2023). A Time Series is Worth 64 Words: Long-term Forecasting with Transformers. arXiv preprint arXiv:2211.14730.
78
+ ```