This repository contains the code of AEC-GAN: Adversarial Error Correction GANs for Auto-Regressive Long Time-Series Generation.
Getting Started:
- Prepare the data:
- We have provide the data in the folder
data
, containing the following six datasets:[etth1, etth2, ettm1, ettm2, us_births, ILI]
- We have provide the data in the folder
- Install dependencies:
- This project is implemented with
pytorch==1.8.1+cu102
- This project is implemented with
- For training
python train.py -datasets $dataset -base_dir $save_path -p $p -q $q -use_cuda -algos 'AECGAN' -total_steps 10000 -batch_size 200 -noise_type min_adv -use_ec 2
$dataset
: We have implementedAEC-GAN
on six datasets:[etth1, etth2, ettm1, ettm2, us_births, ILI]
$save_path
: The path you save the model.$p
: The length of the past conditions.$q
: The length of the forward generations.
- For generation
python train.py -datasets $dataset -base_dir 'results/p168_q336' -p 168 -q 336 -use_cuda -algos 'AECGAN' -total_steps 10000 -batch_size 200 -noise_type min_adv -use_ec 2 -test
$dataset
: We have implementedAEC-GAN
on six datasets:[etth1, etth2, ettm1, ettm2, us_births, ILI]
$save_path
: The path you save the model.$p
: The length of the past conditions.$q
: The length of the forward generations.
- For downstream performance
- The generated data can be used as the alternative training set used for training forecasting models (e.g., SCINet, Informer and Autoformer).
- Folder
models
contains the code to train the downstream forecasting models.
- Easy usage
- For an easy usage, we also provide a bash file
run_file.sh
, which contains the commands to train the models or generate time-series data.
- For an easy usage, we also provide a bash file
Resources
- The GANs' code is partially based on the https://github.com/SigCGANs/Conditional-Sig-Wasserstein-GANs