Equipy is a tool for fast, online fairness calibration
Project description
EquiPy is a Python package implementing sequential fairness on the predicted outputs of Machine Learning models, when dealing with multiple sensitive attributes. This post-processing method progressively achieve fairness accross a set of sensitive features by leveraging multi-marginal Wasserstein barycenters, which extends the standard notion of Strong Demographic Parity to the case with multiple sensitive characteristics. This approach seamlessly extends to approximate fairness, enveloping a framework accommodating the trade-off between performance and unfairness.
The project was started in 2023 by François Hu, Philipp Ratz, Suzie Grondin, Agathe Fernandes Machado and Arthur Charpentier, following the release of this paper “A Sequentially Fair Mechanism for Multiple Sensitive Attributes” (https://arxiv.org/pdf/2309.06627.pdf), written by François Hu, Philipp Ratz and Arthur Charpentier.
For additional details, you can visit the dedicated EquiPy website https://equilibration.github.io/equipy/.
Installation
Dependencies
EquiPy requires:
Numpy (>= 1.17.3)
Scipy (>= 1.5.0)
Scikit-learn (== 1.3.0)
Matplotlib (== 3.7.2)
Pandas (== 2.0.3)
Statsmodels (== 0.14.0)
Seaborn (== 0.12.2)
POT (==0.9.1)
User installation
To install EquiPy, use pip:
pip install equipy
Project Tree Structure
The following is the tree structure of the project:
equipy/
├── equipy/
| ├── __init__.py
| ├── fairness/
| │ ├── __init__.py
| | ├── _base.py
| | ├── _wasserstein.py
| ├── graphs/
| │ ├── __init__.py
| │ ├── _arrow_plot.py
| │ ├── _density_plot.py
| │ ├── _waterfall_plot.py
| ├── metrics/
| │ ├── __init__.py
| │ ├── _fairness_metrics.py
| │ ├── _performance_metrics.py
| ├── utils/
| │ ├── __init__.py
| │ ├── checkers.py
| │ ├── permutations/
| │ | ├── __init__.py
| │ | ├── _compute_permutations.py
| │ | ├── metrics/
| │ | | ├── __init__.py
| │ | | ├── _fairness_permutations.py
| │ | | ├── _performance_permutations.py
├── .gitignore
├── LICENSE
├── README.rst
├── requirements.txt
├── setup.py
└── tests.py
Visualization
This package contains the module graphs which allows visualization of the resulting sequential fairness applied to a response variable.
(Risk, Unfairness) phase diagrams that show the sequential fairness approach for (left pane) two sensitive features; (right pane) three sensitive features.
A sequential unfairness evaluation, for (left pane) exact fairness in $A_{3}$ ; (right pane) approximate fairness in $A_{3}$ with $\epsilon = (\epsilon_{1}, \epsilon_{2}, \epsilon_{3}) = (0.2, 0.5, 0.75)$. Hashed color corresponds to exact fairness.
Help and Support
Communication
If you have any inquiries, feel free to contact us:
François Hu : hu.faugon@gmail.com
Suzie Grondin : suzie.grondin@gmail.com
Philipp Ratz : ratz.philipp@courrier.uqam.ca
Agathe Fernandes Machado : fernandes_machado.agathe@courrier.uqam.ca
Arthur Charpentier : arthur.charpentier@gmail.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file equipy-0.0.6a0.dev0.tar.gz
.
File metadata
- Download URL: equipy-0.0.6a0.dev0.tar.gz
- Upload date:
- Size: 22.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3500a5e751f6d49cf730609db596038fcaaed7a6ced667ec68c51b36dc79e140 |
|
MD5 | 3760779cace88e6342361800a0a9d776 |
|
BLAKE2b-256 | bd5f71a5d1ce8f4048c8b3cb5d1c51055231674c9c1464cc1e6e723488f22253 |
File details
Details for the file equipy-0.0.6a0.dev0-py3-none-any.whl
.
File metadata
- Download URL: equipy-0.0.6a0.dev0-py3-none-any.whl
- Upload date:
- Size: 28.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29d02003a39bd0efcc31e54baf398c78e45dacf2946f48f77a729c82f49a49f0 |
|
MD5 | 7f9fe55be268ae95ef7cc7e4c2b944eb |
|
BLAKE2b-256 | 2feeb2c0869e98abfdb0bc0c10dab34610166daa090a0d36c177ff876f30dd5f |