GithubHelp home page GithubHelp logo

aazibak / fairlearn-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wmeints/fairlearn-demo

0.0 1.0 0.0 7.9 MB

Demonstrates how to use the various parts of the fairlearn package

Dockerfile 2.55% Shell 0.36% Jupyter Notebook 97.08%

fairlearn-demo's Introduction

Fairlearn demo

Welcome to this repository. In this repository you'll find a demonstration of some of the capabilities that fairlearn offers.

There are many ways in which a model can be unfair. fairlearn aims to solve group fairness issues. Your model can suffer from two different kinds of group fairness issues:

  • Quality of service Imagine you're building an image recognition library for assessing skin conditions. Your model could fail to work well for some groups of users with a particular skin color.
  • Allocation For example, you're building a credit card scoring model. It's used to allocate a creditcard to customers. The model could deny creditcards more often for one group of users than it will for other groups.

Imagine you're starting a new credit card company based on a data-driven approach. You want to use a machine learning model to score creditcard applications. People that are going to default their payments aren't going to get a creditcard from your company.

You've spend a lot of time gathering data for your model and you've finally managed to train a model. The model has two outcomes:

  • When the model predicts 1, you're not going to give out a creditcard, because the person is likely to default their payments.
  • When the model predicts 0 you're handing out a credit card.

You made a mistake however, because it seems as if women are getting a credit card more often than men. How are you going to fix this?

We've created 4 notebooks for this scenario:

  1. prepare-dataset.ipynb Prepares the dataset for training and testing purposes.
  2. train-model.ipynb Demonstrates the training process for the model.
  3. measure-fairness.ipynb Demonstrates how to access fairness.
  4. improve-fairness.ipynb Shows how to improve an existing model.

Each notebook describes the individual steps and explains how the different components work together.

To run this demo, you'll need:

If you're trying this demo on Windows, we recommend using Anaconda or Miniconda.

Follow these steps to run the code:

  1. First, install the requirements for the notebooks: pip install -r requirements.txt
  2. Next, start jupyter notebooks from the root of the repository: jupyter notebook

The notebooks are located in the notebooks folder. You can execute the notebooks out of order.

fairlearn-demo's People

Contributors

wmeints 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.