Giter VIP home page Giter VIP logo

laftr's Introduction

Learning Adversarially Fair and Transferable Representations

David Madras, Elliot Creager, Toni Pitassi, Richard Zemel https://arxiv.org/abs/1802.06309

Code represents equal contribution with David Madras. Thanks to Jake Snell and James Lucas for contributing the experiment sweep code.

setting up a project-specific virtual env

mkdir ~/venv 
python3 -m venv ~/venv/laftr

where python3 points to python 3.6.X. Then

source ~/venv/laftr/bin/activate
pip install --upgrade pip
pip install -r requirements.txt

or

pip install -r requirements-gpu.txt

for GPU support

running a single fair classification experiment

source simple_example.sh

The bash script first trains LAFTR and then evaluates by training a naive classifier on the LAFTR representations (encoder outputs). See the paper for further details.

running a sweep of fair classification with various hyperparameter values

python src/generate_sweep.py sweeps/small_sweep_adult/sweep.json
source sweeps/small_sweep_adult/command.sh

The above script is a small sweep which only trains for a few epochs. It is basically just for making sure everything runs smoothly. For a bigger sweep call src/generate_sweep with sweeps/full_sweep_adult/sweep.json, or design your own sweep config.

data

The (post-processed) adult dataset is provided in data/adult/adult.npz

laftr's People

Contributors

ecreager avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

laftr's Issues

Can you provide the setup for training?

Thank you for the awesome code.

I would like to run the model with adult dataset, but I am not sure how to tune the hyper parameter and how long should I train.
Could you provide the data for that?

And also how do you pre-processed the data? I would also like to try for compas and german but I am not sure how you pre-processed.

Thank you in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.