scikit-fairness

_images/logo.png

The goal of this project is to attempt to consolidate fairness related metrics, transformers and models into a package that (hopefully) will become a contribution project to scikit-learn.

Consider all the steps in a machine learning pipeline.

_images/steps.png

This package will offer tools at every step.

Fairness, in data science, is a complex unsolved problem for which many tactics are proposed - each with their own advantage and disadvantages. This packages aims to make these tactics readily available, therefore enabling users to try and evaluate different fairness techniques.

Disclaimer

This package is not (yet, it is a goal) formally affiliated with scikit-learn.

Installation

Install scikit-fairness via pip with

pip install scikit-fairness

Alternatively you can fork/clone and run:

pip install --editable .

Usage

from sklearn.linear_model import LogisticRegression
from sklearn.pipeline import Pipeline

from skfairness.preprocessing import InformationFilter

...

mod = Pipeline([
    ("information_filter", InformationFilter()),
    ("model", LogisticRegression(solver='lbfgs'))
])

...