This repository provides a simple project on time series generation using GAN and PyTorch.
What this repository supports follows:
- Implementation of different models, LSTM-based and Conv-based models, for comparison
- Implementation of different loss functions, L2 and WGAN-GP, for comparsion
- Calculation of metrics proposed by TimeGAN (NeurIPS 2019) for quantitative evaluation
The models show bad performance. The performance depends upon the characteristic of dataset and selection of hyper-parameters heavily.
The dataset used here is Appliances Energy Prediction Data Set and can be found here.
Model | Predictive Score↓ | Discriminative Score↓ |
---|---|---|
LSTM-based Generator with L2 Loss | 0.0582 | N/A |
Conv-based Generator with L2 Loss | 0.0466 | N/A |
The used metrics are simply adopted from the official repository of TimeGAN (NeurIPS 2019).
LSTM-based Generator with L2 Loss | Conv-based Generator with L2 Loss |
---|---|
Please place the file to ./data/
and specify column
that you want to generate.
If you want to train Conv-based Generator with WGAN-GP loss,
python main.py --mode 'train' --model 'conv' --criterion 'wgangp'
To handle more arguments, you can refer to here.
You can save plot and csv files then derive metrics on the test set. Please install tensorflow 1.15 to obtain corresponding metrics.
python main.py --mode 'test'
- Metrics for Quantitative Evaluation from TimeGAN (NeurIPS 2019)
- Data Pre-processing from WGAN_financial_time-series
- Ubuntu 18.04 LTS
- NVIDIA GFORCE RTX 3090
- CUDA 10.2
- torch 1.6.0
- torchvision 0.7.0
- tensorflow 1.15
- etc