Metadata-Version: 2.4
Name: schneiderkamplab-decaf
Version: 0.1.7.post1
Summary: DEbiasing CAusal Fairness
Home-page: https://github.com/schneiderkamplab/DECAF
Author: Trent Kyono
Author-email: 
License: BSD-3-Clause
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Intended Audience :: Healthcare Industry
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: loguru
Requires-Dist: networkx<4,>=2
Requires-Dist: numpy<3,>=2
Requires-Dist: pandas
Requires-Dist: pytorch-lightning<3,>=2
Requires-Dist: scipy
Requires-Dist: scikit-learn
Requires-Dist: torch<3,>=2
Requires-Dist: torchtext>=0.18
Requires-Dist: xgboost
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: summary

# DECAF (DEbiasing CAusal Fairness)
[![Tests](https://github.com/vanderschaarlab/DECAF/actions/workflows/test_decaf.yml/badge.svg)](https://github.com/vanderschaarlab/DECAF/actions/workflows/test_decaf.yml)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://github.com/vanderschaarlab/DECAF/blob/main/LICENSE)

Code Author: Trent Kyono

This repository contains the code used for the "DECAF: Generating Fair Synthetic Data Using Causally-Aware Generative Networks" paper(2021).

## Installation

```bash
pip install -r requirements.txt
pip install .
```

## Tests
You can run the tests using
```bash
pip install -r requirements_dev.txt
pip install .
pytest -vsx
```

## Contents

- `decaf/DECAF.py` - Synthetic data generator class - DECAF.
- `tests/run_example.py` - Runs a nonlinear toy DAG example.  The dag structure is stored in the `dag_seed` variable.  The edge removal is stored in the `bias_dict` variable.  See example usage in this file.

## Examples

Base example on toy dag:
```bash
$ cd tests
$ python run_example.py
```

An example to run with a dataset size of 2000 for 300 epochs:
```bash
$ python run_example.py --datasize 2000 --epochs 300
```

## Citing
```
@inproceedings{kyono2021decaf,
	title        = {DECAF: Generating Fair Synthetic Data Using Causally-Aware Generative Networks},
	author       = {Kyono, Trent and van Breugel, Boris and Berrevoets, Jeroen and van der Schaar, Mihaela},
	year         = 2021,
	booktitle    = {Conference on Neural Information Processing Systems(NeurIPS) 2021}
}
