Fairnes checker
Project description
Fairness Checker
This Python module fairness_checker provides a set of methods to evaluate the fairness of a predictive model's outcomes across different demographic groups represented in a CSV file or given a model.
Dependencies
- Python >= 3.6
Installation
pip3 install fairness-checker
Usage
For example:
from fairness_checker import fairness_csv_checker
c = fairness_csv_checker("compas-scores-two-years.csv")
c.demographic_parity(0.2, lambda row: row['sex'] == 'Male', lambda row: row['score_text'] in {'Medium', 'High'})
Output:
demographic parity
fair: 0.04 < 0.2
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
fairness_checker-0.0.4.tar.gz
(6.1 kB
view hashes)
Built Distribution
Close
Hashes for fairness_checker-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06c2c486562f7222bb9d90c469bafb86326df132cbe628ffdc3989fd7574244a |
|
MD5 | baeedc20ad4672c1bdca030547082bf8 |
|
BLAKE2b-256 | b13702965509c73865e9f3cfb7e55174344d8a65e0b334fac0f1592c6db65ce1 |