A library that provides metrics and algorithms for bias assessment in datasets using CP-based methods
Project description
cp-based-fair-maker
Description
This is a library for creating fair ML datasets using Constraint Programming (CP). It suggests a way to create fair datasets by solving a constraint satisfaction problem (CSP) using CP and various fairness metrics. The library is based on the Google OR-Tools CP solver.
Glossary
- Protected attribute: An attribute/feature that divides the population into groups that we want to be fair to. For example, race or gender can be protected attributes.
- Privileged group: Considering a protected attribute, the groups that have historically been advantaged or have had more opportunities.
- Unprivileged group: Considering a protected attribute, the groups that have historically been disadvantaged or have had fewer opportunities.
- Instance: A row in the dataset.
- Feature: A column in the dataset.
- Instance weight: A weight assigned to each instance in the dataset. It can be seen as the number of times an instance is repeated in the dataset.
- Label column: The column that represents the class labels of the instances.
- Score columns: Columns that represent the confidence scores of the instances for each class label.
- Fairness metric: A metric that measures the fairness of the dataset.
- Fairness threshold: A threshold value for a fairness metric. The fairness metric value is compared to this threshold to determine if the dataset is fair or not.
Install from source
If you want to install the package from the source code, you can clone the repository and install it using pip:
pip install build setuptools wheel
python -m build
pip install dist/cp_based_fair_maker-<version>.whl
Here <version> should be replaced with the actual version number of the package.
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cp_based_fair_maker-0.0.3.tar.gz.
File metadata
- Download URL: cp_based_fair_maker-0.0.3.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83f97e93b46b1a5fa448aa1a8e32d0dfcde0873505137fef8afce1f0e325f93a
|
|
| MD5 |
994a7285428e632430dbaece156a6eea
|
|
| BLAKE2b-256 |
41dbd33e1615ff88f4abdc739f7f21118a995f7eb1424162520e251082ed17d5
|
File details
Details for the file cp_based_fair_maker-0.0.3-py3-none-any.whl.
File metadata
- Download URL: cp_based_fair_maker-0.0.3-py3-none-any.whl
- Upload date:
- Size: 21.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2e4c4ef0f535dba0bfe86f2409db1240de7c16d12015747121ed735e49c62e1
|
|
| MD5 |
b5699d737d87522cf7c732711363e2c3
|
|
| BLAKE2b-256 |
faee3ce0ca86c77ee8e21607de07097c6923046bcb99d1cbf5bdf550151c0872
|