Four-Project Series

Mitigate Machine Learning Bias in Mortgage Lending Data

filed under

In this series of liveProjects, you’ll apply techniques for measuring and mitigating bias in a machine learning algorithm. You’ll step into the role of a data scientist for a bank, and investigate the potential biases that arise when automated decision-making is applied to your company’s mortgage offers—in particular, whether your algorithm is biased by gender. Each project in this series covers a different aspect of fairness measurement and intervention, including exploring a dataset with a focus on fairness, and mitigating bias in a logistic regression model.

These projects are designed for learning purposes and are not complete, production-ready applications or solutions.

here's what's included

Project 1 Measuring Bias in a Dataset
In this liveProject, you’ll compute and chart metrics that show the key characteristics in Home Mortgage Disclosure Act (HMDA) dataset, and investigate relationships between key demographics and other features that may lead to a biased machine learning model. You’ll compute and chart “equality of outcome” bias metrics, and produce a report into your insights.
try now
Project 2 Measuring Bias in a Model
In this liveProject, you’ll investigate and report on whether your company’s mortgage application classifier is making fair decisions between male and female applicants. You’ll train a logistic regression classifier on the HMDA dataset, compute performance metrics with a logistic regression classifier, and then chart “equality of opportunity” bias metrics.
$29.99 $17.99
add to cart
Project 3 Mitigating Bias with Preprocessing
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.
$29.99 $17.99
add to cart
Project 4 Mitigating Bias with Postprocessing
In this liveProject, you’ll use the open source AI Fairness 360 toolkit from IBM and the “equalized odds post-processing” method to post-process your model for the purpose of bias mitigation. “Equalized odds post-processing” seeks to mitigate bias by making modifications to the prediction label after a model has been trained. After charting bias metrics on a basic classifier, you’ll tune the classification threshold to explore the impact on revealed biases.
$29.99 $17.99
add to cart

project author

Adriano Koshiyama
Adriano Koshiyama is a Research Fellow in Computer Science at University College London, and the co-founder of Holistic AI, a start-up focused on providing advisory, auditing and assurance of AI systems. He helps manage TheAlgo Conferences ( and is the main investigator at UCL Algorithm Standards and Technology Lab. Academically, he has published more than 30 papers in international conferences and journals.


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
  • Basic machine learning

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
  • Preprocessing a dataset using one-hot encoding
  • Using the pandas library to compute metrics
  • 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 subjects” method
  • Mitigate bias using AIF360 to post-process the model using the “equalized odds” method


You choose the schedule and decide how much time to invest as you build your project.
Project roadmap
Each project is divided into several achievable steps.
Get Help
While within the liveProject platform, get help from other participants and our expert mentors.
Compare with others
For each step, compare your deliverable to the solutions by the author and other participants.
book resources
Get full access to select books for 90 days. Permanent access to excerpts from Manning products are also included, as well as references to other resources.
includes 4 liveProjects
liveProject $49.99 $69.99 self-paced learning