About Fairlearn
Fairlearn is an open source Python toolkit for assessing and improving the fairness of machine learning systems. It gives data scientists a way to measure how a model's errors are distributed across groups of people, then apply algorithms that reduce the disparities it finds. The project treats fairness as sociotechnical rather than purely numerical, so the library ships alongside guides and worked use cases that explain what a given metric does and does not capture.
Assessment is built around grouped metrics: any scoring function can be evaluated per subgroup and compared, with plotting helpers for the results. Common fairness metrics documented in the user guide include demographic parity, equalized odds and equal opportunity, and the guide also covers the four fifths rule and how it is commonly misapplied. Mitigation algorithms are organized by where they act in the pipeline. Preprocessing offers a correlation remover and a prototype representation learner, reductions offer exponentiated gradient and grid search, postprocessing offers a threshold optimizer, and there is an adversarial mitigation approach as well. Sample datasets are included, and a credit card default case study shows assessment and mitigation on a lending model in a Jupyter notebook.
The toolkit is free. It installs with pip from PyPI and there is no commercial tier, support contract or paid edition published on the site. Help comes from the community through Discord, Stack Overflow and the GitHub repository, where contributions of code, documentation and case studies are invited.
Fairlearn began in 2018 as a package accompanying research on a reductions approach to fair classification. It adopted neutral governance in 2021 and is now maintained by a named group of community maintainers under the Fairlearn Organization rather than a single company.