Giter VIP home page Giter VIP logo

gerryfair's Introduction

GerryFair: Auditing and Learning for Subgroup Fairness

Fairness Gerrymandering: when "a classifier appears to be fair on each individual group, but badly violates the fairness constraint on one or more structured subgroups defined over the protected attributes" (from Kearns et al., https://arxiv.org/abs/1711.05144)

This repository contains python code for:

  • learning fair classifiers subject to subgroup fairness constraints (as described in https://arxiv.org/abs/1711.05144)
  • auditing classifier predictions for fairness violations
  • visualizing tradeoffs between error and fairness metrics
  • fairness sensitive datasets for experiments (as used in https://arxiv.org/abs/1808.08166)

Fairness metrics supported for learning and auditing:

  • False Positive Rate equality
  • False Negative Rate equality

Learner classes supported:

  • Any sklearn binary classifier (defaults to LinearRegression)

Group classes supported:

  • Linear threshold functions over protected attributes

Prerequisites

To install the package and prepare for use, run:

git clone https://github.com/algowatchPenn/GerryFair.git
pip install -r requirements.txt

The current iteration of the package uses the following python packages: pandas, numpy, sklearn, matplotlib If you already have these installed, you can forgo the requirements step.

Using our package

For demonstration of the GerryFair API, please see our jupyter notebook. Other examples of usage are provided as scripts in the examples folder. These should be run from a location which contains the gerryfair folder.

Datasets

License

  • GerryFair/license.txt
  • Maintained by: Seth Neel ([email protected]), William Brown, Adel Boyarsky, Arnab Sarker, Aaron Hallac.
  • Property of: Michael Kearns, Seth Neel, Aaron Roth, Z. Steven Wu.
  • For questions or concerns, contact Algowatch Project ([email protected]).

gerryfair's People

Contributors

wibrown avatar svnscholar avatar sethneel avatar hallaca avatar arnabsarker avatar algowatchpenn avatar steven7woo avatar adel-boyarsky avatar

Watchers

James Cloos 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.