Coder Social home page Coder Social logo

zemel-et-al.-2013-learning-fair-representations-'s Introduction

Zemel-et-al.-2013-Learning-Fair-Representations-

Reproduction of Zemel, et al. "Learning Fair Representations", ICML 2013 The code take inspiration from two repositories.

The idea was to reproduce part of the experiment proposed in the article since no guidelines are available in both the repositories, and different problems trying to reproduce the article with both the repo. In the litterature, this is considered as a PRE-PROCESSING fair representation algorithm. However, the authors propose LFR as both a PRE and IN-PROCESSING algorithm. Zemel, et al. use different not usual metrics:

Following, the metrics used in the plots proposed by myself:

Installation guidelines:

Following, the instruction to install the correct packages for running the experiments (numba==0.48.0 is mandatory)

$ python3 -m venv venv_lfr
$ source venv_lfr/bin/activate
$ pip install --upgrade pip
$ pip install -r requirements.txt

Training and test the model

To train and evaluate LFR with all the metrics, you may run the following command:

$ python -u main.py

or run the personilized dataset, changing LINE 19 & 20 ("sensitive_features" and "dataset") and the "dataloader" of main.py script with an IDE or with sudo nano main.py

Results

Following the graphics of train and test at various thresholds for different metrics (Accuracy, Difference in Equal Opportunity, Difference in Averages Odds, Fair_DEO==ACC*(1-DEO), Fair_DAO==ACC*(1-DAO)) and both German and Adult. The plot show the accuracy-fairness trade-off at various thresholdes for the generated(or predicted) y_hat.

  • GERMAN dataset

image !image

Next the metrics used by Zemel, et al. on the Test set
Accuracy: 0.6702218787753681
Discrimination: 0.03959704798033192
Consistency: 0.4259762244816738
  • ADULT dataset

image image

Next the metrics used by Zemel, et al. on the Test set
Accuracy: 0.6303079728728369
Discrimination: 0.001884131225272645
Consistency: 0.7975905194197657

zemel-et-al.-2013-learning-fair-representations-'s People

Contributors

giandos200 avatar

Stargazers

 avatar

Watchers

 avatar

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.