This repository contains the code of the following paper
K Aggarwal, M Kirchmeyer, P Yadav, S Sathiya Keerthi, P Gallinari, "Regression with Conditional GAN"
In order to run, the code requires the following Python modules referenced in requirements.txt
:
- numpy, jupyter, matplotlib, pandas
- sklearn
- tensorflow, keras
- GPy
https://sheffieldml.github.io/GPy/
CGAN code is derived from https://github.com/eriklindernoren/Keras-GAN
- Install Miniconda
- Create conda environment:
conda create --name ganRegression python=3.6 -y
then source itsource activate ganRegression
- Install the requirements in this environment
pip install -r requirements.txt
- Install the package
pip install -e .
at the root - Run the notebooks using
jupyter-notebook
- Run
notebook/synthetic_data.ipynb
for synthetic data - Run
notebook/real_world_data.ipynb
for real world data - Notebooks will save figures in the
figures
folder for each data scenario
- Synthetic datasets:
linear
,sinus
,heteroscedastic
,exp
,multi-modal
- Real World datasets:
CA-housing
taken fromsklearn.datasets
.CA-housing-single
takes the most important feature fromCA-housing
(cf. study in the paper)ailerons
taken fromhttp://www.dcc.fc.up.pt/~ltorgo/Regression/DataSets.html
comp-activ
,pumadyn
,bank
,census-house
,abalone
taken fromhttps://www.cs.toronto.edu/~delve/data/datasets.html
- The Config class handles all parameters. These are set at the beginning of each notebook. Refer to
config.py
for more details - Architectures are fixed in
cgan_model.py
or can be set in the Config object for custom experiments.
- Results from the paper can be reproduced with an uncertainty smaller than 0.05 on NLPD + MAE for CGAN.