Fairensics is a python library to discover and mitigate biases in machine learning models and datasets. The best location to learn about fairensics are the Jupyter Notebooks..
Fairensics is based on AIF360 and provides compatible versions of the fairness methods found here.
A detailed documentation of fairensics can be found here.
- (Optionally) create a virtual environment
python3 -m venv fairensics-env
source fairensics-env/bin/activate
- Install via pip
pip install fairensics
You can also install Fairenscis directly from source.
git clone https://github.com/nikikilbertus/fairensics.git
cd fairensics
pip install -r requirements.txt
Simply download the entire repository. It can then be imported like any other module.
For example, if the file structure is the following:
├── ...
├── fairensics
├── test_file.py
and test_file.py
wants to use fairensics, the import statement would be from fairensics import ...
.
To import the method fair_classification
this could be:
from fairensics.fairness_methods.modeling import fair_classification # importing a method