A Pytorch implelmentation of VAE for handling missing data in test. Here is my medium post.
- pytorch
- numpy
- matplotlib
- tqdm
This is a sample code to working with a VAE in pytorch in with missing data. There are two experiments with two datasets: MNIST and synthetic timeseries data. In the following you can find how to run each experiment.
To train VAE:
python main.py --epochs 100 --train_mode mnistTo test with partial data:
python tests.py --test_partial_data_mnistAn example of sampling output:

An example of reconstruction output:

An example of reconstruction output with partial data:

First we need to generate synthetic data for both train and test data
python tests.py --generate_timeseries_synthetic_train
python tests.py --generate_timeseries_synthetic_testAnd then train VAE model:
python main.py --epochs 100 --train_mode synthetic_timeserieAnd finally test with partial data
python tessts.py --test_partial_data_synthetic_ts
