From the course: Data-Centric AI: Best Practices, Responsible AI, and More

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Code example: Bias detection and mitigation

Code example: Bias detection and mitigation

- [Instructor] Now let's continue with our same Maternal Health Risk dataset example that we started with, and see how we can apply bias detection and mitigation in the model that we're going to be building. To start with, I'm going to be using FairLearn Package in this example. It does not have support for multi-class variable detection for bias, and hence, I am converting this example into a binary class mapping. So the categories I'm creating is one for high risk, and everything else falls as zero. Low risk and mid risk falls under one category. So in this binary mapping, what I'm doing is I'm using the high risk as one particular target, versus low risk and medium risk as a separate target. This makes sense because what we essentially want to see if is a patient is high risk or not. In your particular use case, if you think that it is important to know the low risk or medium risk patient, you can use that as well. But…

Contents