Giter VIP home page Giter VIP logo

stereotyping_rocds's Introduction

Stereotyping_ROCDS

Code and files related to ROC Data Science Meetup 12 Nov 2020.
https://www.meetup.com/ROC-Data-Science/events/274237489/

Explores fairness metrics and Shapley explanation techniques for detecting stereotyping and feature bias in models. Shows that fairness metrics do not distinguish stereotyping from decisions made based on reasonable factors. Demonstrates that features driving differences can be isolated using Shapley techinques, and suggests additional tests for analyzing causes of differences.

Uses an xgboost model via h2o; currently this is supprted only on Linux. To use a random forest model instead (which will work on Windows), modify 02_models.R by changing the value of kModelType near the top of the file.

To run the code, do the following:

  1. Install h2o (see http://h2o-release.s3.amazonaws.com/h2o/rel-zermelo/1/index.html)
  2. Open the package 202010_fairness.Rproj in R Studio (if not using RStudio, set your working directory to the folder containing the project)
  3. Edit the file 00_setup.R, setting kOutputDir to a writeable directory on your machine
  4. Run the file 00_run_all.R

Because exact Shapley values are calculated, runtimes are long. The number of samples analyzed can be reduced to speed up the scripts.

Towards Data Science Article Code

For Fairness Metrics Won’t Save You from Stereotyping, you only need to run scripts 00, 01, 02, 03, and 05.

For No Free Lunch with Feature Bias and How to Fix Feature Bias, run scripts 00, 01, 02,04, 06, and 07.

stereotyping_rocds's People

Contributors

vla6 avatar

Stargazers

 avatar

Watchers

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