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 -ythen 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.ipynbfor synthetic data - Run
notebook/real_world_data.ipynbfor real world data - Notebooks will save figures in the
figuresfolder for each data scenario
- Synthetic datasets:
linear,sinus,heteroscedastic,exp,multi-modal - Real World datasets:
CA-housingtaken fromsklearn.datasets.CA-housing-singletakes the most important feature fromCA-housing(cf. study in the paper)aileronstaken fromhttp://www.dcc.fc.up.pt/~ltorgo/Regression/DataSets.htmlcomp-activ,pumadyn,bank,census-house,abalonetaken 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.pyfor more details - Architectures are fixed in
cgan_model.pyor 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.