<h1 align="center">LSTM-autoencoder with attentions for multivariate time series</h1>
<p align="center">
<img src="https://hitcounter.pythonanywhere.com/count/tag.svg?url=https%3A%2F%2Fgithub.com%2FJulesBelveze%2Ftime-series-autoencoder" alt="Hits">
<img src="https://img.shields.io/badge/Made%20with-Python-1f425f.svg">
</p>
This repository contains an autoencoder for multivariate time series forecasting.
It features two attention mechanisms described in *[A Dual-Stage Attention-Based Recurrent Neural Network for Time Series Prediction](https://arxiv.org/abs/1704.02971)* and was inspired by [Seanny123's repository](https://github.com/Seanny123/da-rnn).
![Autoencoder architecture](autoenc_architecture.png)
## Download and dependencies
To clone the repository please run:
```
git clone https://github.com/JulesBelveze/time-series-autoencoder.git
```
To install all the required dependencies please run:
```
pip install -r requirements.txt
```
## Usage
```
python main.py [-h] [--batch-size BATCH_SIZE] [--output-size OUTPUT_SIZE]
[--label-col LABEL_COL] [--input-att INPUT_ATT]
[--temporal-att TEMPORAL_ATT] [--seq-len SEQ_LEN]
[--hidden-size-encoder HIDDEN_SIZE_ENCODER]
[--hidden-size-decoder HIDDEN_SIZE_DECODER]
[--reg-factor1 REG_FACTOR1] [--reg-factor2 REG_FACTOR2]
[--reg1 REG1] [--reg2 REG2] [--denoising DENOISING]
[--do-train DO_TRAIN] [--do-eval DO_EVAL]
[--data-path DATA_PATH] [--output-dir OUTPUT_DIR] [--ckpt CKPT]
```
Optional arguments:
```
-h, --help show this help message and exit
--batch-size BATCH_SIZE
batch size
--output-size OUTPUT_SIZE
size of the ouput: default value to 1 for forecasting
--label-col LABEL_COL
name of the target column
--input-att INPUT_ATT
whether or not activate the input attention mechanism
--temporal-att TEMPORAL_ATT
whether or not activate the temporal attention
mechanism
--seq-len SEQ_LEN window length to use for forecasting
--hidden-size-encoder HIDDEN_SIZE_ENCODER
size of the encoder's hidden states
--hidden-size-decoder HIDDEN_SIZE_DECODER
size of the decoder's hidden states
--reg-factor1 REG_FACTOR1
contribution factor of the L1 regularization if using
a sparse autoencoder
--reg-factor2 REG_FACTOR2
contribution factor of the L2 regularization if using
a sparse autoencoder
--reg1 REG1 activate/deactivate L1 regularization
--reg2 REG2 activate/deactivate L2 regularization
--denoising DENOISING
whether or not to use a denoising autoencoder
--do-train DO_TRAIN whether or not to train the model
--do-eval DO_EVAL whether or not evaluating the mode
--data-path DATA_PATH
path to data file
--output-dir OUTPUT_DIR
name of folder to output files
--ckpt CKPT checkpoint path for evaluation
```
## Features
* handles multivariate time series
* attention mechanisms
* denoising autoencoder
* sparse autoencoder
## Examples
You can find under the `examples` scripts to train the model in both cases:
* reconstruction: the dataset can be found [here](https://gist.github.com/JulesBelveze/99ecdbea62f81ce647b131e7badbb24a)
* forecasting: the dataset can be found [here](https://gist.github.com/JulesBelveze/e9997b9b0b68101029b461baf698bd72)
没有合适的资源?快使用搜索试试~ 我知道了~
time-series-autoencoder:Pytorch双注意LSTM自动编码器,用于多元时间序列预测
共18个文件
py:11个
yml:1个
toml:1个
5星 · 超过95%的资源 需积分: 48 55 下载量 83 浏览量
2021-05-01
18:50:17
上传
评论 18
收藏 249KB ZIP 举报
温馨提示
注重多元时间序列的LSTM自动编码器 该存储库包含用于多变量时间序列预测的自动编码器。 它具有描述的两种注意力机制,并且受启发。 下载和依赖项 要克隆存储库,请运行: git clone https://github.com/JulesBelveze/time-series-autoencoder.git 要安装所有必需的依赖项,请运行: pip install -r requirements.txt 用法 python main.py [-h] [--batch-size BATCH_SIZE] [--output-size OUTPUT_SIZE] [--label-col LABEL_COL] [--input-att INPUT_ATT] [--temporal-att TEMPORAL_ATT] [--seq-le
资源详情
资源评论
资源推荐
收起资源包目录
time-series-autoencoder-master.zip (18个子文件)
time-series-autoencoder-master
.github
workflows
ponicode.yml 2KB
poetry.lock 42KB
autoenc_architecture.png 225KB
requirements.txt 276B
examples
forecasting
config_forecasting.py 1KB
run_forecasting.py 4KB
reconstruction
config_reconstruction.py 1KB
run_reconstruction.py 4KB
README.md 4KB
.gitignore 2KB
pyproject.toml 387B
tsa
train.py 3KB
config.py 1KB
main.py 5KB
model.py 9KB
dataset.py 3KB
__init__.py 138B
eval.py 3KB
共 18 条
- 1
火石创造
- 粉丝: 30
- 资源: 4667
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于JavaScript 实现的KMP 算法
- 基于C++实现二叉树的创建,遍历,添加,查找与删除
- 基于C语言实现二叉树的基本操作
- 毕业设计基于STM32的测量温度与压力的数据处理设计C语言完整源码+论文.zip
- 基于MATLAB的PCA算法人脸识别项目源码+GUI界面+说明文档.zip
- 基于STM32的测量温度与压力的数据处理设计源码+论文(毕业设计).zip
- Vision Transformer 网络对不同氨气氧气浓度轨迹RAS 图像数据集的分类,包含训练权重和数据集、迁移学习
- 基于C51带字库LCD12864(ST7920)的keil工程源码,只支持8位并口通讯(不支持串口),可显示中文.zip
- 基于SI4463射频模块433MD-SMA无线模块软硬件技术资料及(SI4463)IC技术资料文档.zip
- (GPS+北斗+GSM)HLK-GS2503模块软硬件开发资料包硬件参考设计(原理图PCB)+技术文档资料.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论5