Skip to content

A Pytorch implementation example of Variation Auto Encoder

License

Notifications You must be signed in to change notification settings

e3oroush/vae_missing_data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Variation Autoencoder with Missing values

A Pytorch implelmentation of VAE for handling missing data in test. Here is my medium post.

Requirements:

How to run

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.

Running with MNIST

To train VAE:

python main.py --epochs 100 --train_mode mnist

To test with partial data:

python tests.py --test_partial_data_mnist

An example of sampling output:
Samples output

An example of reconstruction output:
Reconstruct output

An example of reconstruction output with partial data:
Reconstruct partial output

Running with synthetic timeseries

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_test

And then train VAE model:

python main.py --epochs 100 --train_mode synthetic_timeserie

And finally test with partial data

python tessts.py --test_partial_data_synthetic_ts

An example of reconstruction:
Reconstruct output

An example of reconstruction with partial data: Reconstruct with prtial data output

About

A Pytorch implementation example of Variation Auto Encoder

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages