In this liveProject, you’ll use the open-source AI Fairness 360 toolkit from IBM to measure and mitigate bias with model preprocessing. You will chart bias metrics on a basic classifier, before preprocessing your training data with the “reweighing” method. Reweighing seeks to mitigate bias by making modifications on the training data by computing and applying a set of weights. The weights are calculated such that the training data, with weights applied, is free of discrimination with respect to a protected attribute. Once your model is preprocessed, you’ll construct a classifier that makes use of the data.
This project is designed for learning purposes and is not a complete, production-ready application or solution.
The liveProject is for beginner data scientists and software engineers looking to tackle the basic principles of measuring and mitigating ML bias. To begin this liveProject, you will need to be familiar with:
- Basic Python
- Basic Jupyter Notebook
- Basic pandas
- Basic scikit-learn
- Basic seaborn
you will learn
In this liveProject, you’ll learn to assess your machine learning model for bias and identify any patterns that may be unfairly prejudiced against protected characteristics.
- Setting up a Google Colab environment to run Python code in a Jupyter Notebook.
- Loading a pickled dataset into Google Colab.
- Using scikit-learn to train a logistic regression classifier and compute performance metrics.
- Using the seaborn library to produce charts visualizing the metrics.
- Gain familiarity with AIF360 open-source library from IBM.
- Mitigate bias using AIF360 to preprocess the model using the reweighing method.