Giter Site home page Giter Site logo

cavalab / interfair Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 4.19 MB

Bias Detection Tool Entry for the #ExpeditionHacks Competition

Home Page: http://cavalab.org/interfair/

License: BSD 3-Clause "New" or "Revised" License

Python 11.00% CSS 88.87% JavaScript 0.13%

interfair's Introduction

InterFair

Summary

InterFair is our Bias Detection Tool Entry for the #ExpeditionHacks competition on bias in healthcare. Our entry uses a new fair machine learning framework called Fairness Oriented Multiobjective Optimization, or Fomo. Interfair allows any interested healthcare entity (a hospital system, insurance payor, or individual clinic) to feed in an ML model for a given prediction task, measure its performance across intersectional groups of patients, and optimize it with respect to several flexible fairness constraints.

Overview

In this repository we provide two scripts that measure bias (measure_disparity.py) and correct for it (mitigate_disparity.py). We also provide a demonstration that uses these scripts to measure and mitigate bias in models that predict risk of emergency department admission. Our demonstration is based on the recently released MIMIC-IV electronic health record dataset.

Basic Usage

Installation

pip install -r requirements.txt

Measuring Model Disparity

To use measure_disparity.py, you must first create a pandas DataFrame containing outputs from your model on a set of observations, the true labels, and a variable number of demographic columns. You can then run the following from the command line:

python measure_disparity.py --dataset your_dataset.csv

See the Demo: Measuring Disparity for additional info.

Mitigating Model Disparity

To use mitigate_disparity.py, you must first have a pandas DataFrame containing observations, the true labels, and a variable number of demographic columns. You can then run the following from the command line:

python mitigate_disparity.py --dataset your_dataset.csv

See the Demo: Mitigating Disparity for additional info.

License

Interfair is licensed under BSD 3. See LICENSE.

Contact

Team: Willam La Cava and Elle Lett

Team Lead Contact: [email protected]

When they are not competing in hackathons, William and Elle can be found conducting research at the Cava lab, part of the Computational Health Informatics Program at Boston Children's Hospital.

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.