# LaST: Learning Latent Seasonal-Trend Representations for Time Series Forecasting

In this repository, we provide the original PyTorch implementation of LaST framework.
[](https://drive.google.com/file/d/1LIi2OyHV0sqplMiw6l_aTjI5JhRQrYyZ/view?usp=sharing)
## Dataset
We conducted extensive experiments on seven real-world benchmark datasets from four covering the categories of mainstream time series forecasting applications.
Please download from the following buttons and place them into `datasets` folder.
[](https://drive.google.com/drive/folders/13Ae_qDDxTQDroHCKUIG4xp3Sfi6yuhjX?usp=sharing)
## Usage
#### Requirements
The code was tested with `python 3.8`, `pytorch 1.8.1`, `cudatookkit 10.2`, and `cudnn 7.6.5`. Install the dependencies via [Anaconda](https://www.anaconda.com/):
```shell
# create virtual environment
conda create --name LaST python=3.8
# activate environment
conda activate LaST
# install pytorch & cudatoolkit
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch-lts
# install other requirements
conda install numpy pandas
```
#### Run code
To train and evaluate LaST framework on a dataset, run the following command:
```shell
python run.py --data <dataset_name> --features <forecasting_mode> --seq_len <input_length> --pred_len <pred_length> --latent_size <latent_size> --batch_size <batch_size> --patience <patience> --seed <random_seed>
```
The detailed descriptions about the arguments are as following:
| Parameter name | Description |
| ---------------- | ------------------------------------------------------------ |
| dataset_name | The dataset name can be selected from ["ETTh1", "ETTh2", "ETTm1", "ETTm2", "Exchange_rate", "Electricity", "Weather"] |
| forecasting_mode | A value in ["S", "M"]. "S" denotes univariate forecasting while "M" denotes multivariate forecasting. |
| input_length | The input (historical) sequence length, default is 201. |
| pred_length | The output (forecasting) sequence length. |
| latent_size | The dimension of latent representations, default is 128. |
| batch_size | Batch size, default is 32. |
| patience | The steps of early stop strategy in training. |
| random_seed | The random seed. |
## Directory Structure
The code directory structure is shown as follows:
```shell
LaST
├── datasets # seven datasets files
│ ├── ETTh1.csv
│ ├── ETTh2.csv
│ ├── ETTm1.csv
│ ├── ETTm2.csv
│ ├── electricity.csv
│ ├── exchange_rate.csv
│ └── weather.csv
├── expriments # training, validation, and test code of LaST
│ ├── exp_basic.py
│ └── exp_LaST.py
├── models # code of LaST and its dependencies
│ ├── LaST.py # LaST main code
│ └── utils.py # modules for LaST including autocorrelation, cort, etc.
├── utlis
│ ├── data_loader.py # data loading and preprocessing code
│ ├── metrics.py # metrics for evaluation
│ ├── timefeatures.py # extract time-related features
│ └── tools.py # tools for training, such as early stopping and learning rate controls
├── LICENSE # code license
├── run.py # entry for model training, validation, and test
└── README.md # This file
```
## Citation
Please cite our paper if it's helpful to you in your research.
```
@inproceedings{wang2022latent,
title = "Learning Latent Seasonal-Trend Representations for Time Series Forecasting",
author = "Wang, Zhiyuan and Xu, Xovee and Zhang, Weifeng and Trajcevski, Goce and Zhong, Ting and Zhou, Fan",
booktitle = "Advances in Neural Information Processing Systems",
year = "2022"
}
```
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
基于Seasonal-Trend的时间序列预测(PyTorch完整源码和数据) 基于Seasonal-Trend的时间序列预测(PyTorch完整源码和数据) 基于Seasonal-Trend的时间序列预测(PyTorch完整源码和数据) Seasonal-Trend 时间序列预测 PyTorch 完整源码和数据
资源推荐
资源详情
资源评论























收起资源包目录


































共 26 条
- 1
资源评论

- Xiao龙飞2022-11-28拿别人的开源代码卖钱可真不错,还知道改个文件名,专业。https://github.com/zhycs/LaST。 #毫无价值
- csdnfan172024-01-09感谢资源主分享的资源解决了我当下的问题,非常有用的资源。

前程算法屋
- 粉丝: 7252
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 嵌入式系统及应用-Chapter1-嵌入式系统导论.ppt
- 网络营销精英培训计划.pptx
- 最新毋岩毕业设计正文(基于单片机设计的数字电子钟).doc
- 乐活网电子商务解决方案.doc
- 数字图像处理(冈萨雷斯)第一章-绪论.ppt
- 校园网络维护记录[最终版].pdf
- 循环程序设计陈.doc
- 主流计算机图像技术.doc
- 云计算关键技术与应用技能协作训练组集训专项方案.doc
- 数据库原理与技术课程习题答案.doc
- 网络工程生产实习报告.doc
- 学习]网络科学导论度分布.ppt
- 专升本《计算机软件基础》模拟题试卷.doc
- 互联网应用与安全.ppt
- 项目管理技术在工程成本方面的综合运用.doc
- 网络游戏营销方案.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
