Description • Related • Features • How To Use • Data used
The project is a PyTorch implementation of Generative Adversarial Imputation Networks algorithm for imputation of missing values in data.
The core of the project is another PyTorch implementation that has been refactored and upgraded (see below).
Refactoring fixes (in order of importance):
- Fixed bug of training by batches in the train() method
- All model elements have been compiled into a separate class in the .py module to allow import into other projects
- Fixed Hint matrix calculation according to the original article
- Generator and Discriminator are defined using inheritance from the torch.nn.module class
- Added option to use the model after training (evaluation() method)
- Added the option to use EarlyStopping in the training process
- Added the ability to change the device during operation
- Saving the history of error changes in the training process
- Setting the seed value to reproduce the results
Python 3.9 was used during development, other dependencies are listed in the requirements.txt file at the root of the project.
An example of using the GAIN class for data imputation is presented in the usage_example.py module.
The following data were used in the original article and in the development process: