Trustworthy Healthcare AI: federated learning, fairness auditing, and explainability for clinical settings
Project description
FairHealth
Trustworthy Healthcare AI — built from peer-reviewed research.
FairHealth is an open-source Python library for building fair, explainable, and privacy-preserving machine learning models for healthcare.
Built by Farjana Yesmin from peer-reviewed research on maternal health, biosignals, and federated learning.
Install
pip install fairhealth
What It Does
| Module | What | Paper |
|---|---|---|
fairhealth.fairness |
Demographic parity, equalized odds, disparate impact | MobiHealth 2026 |
fairhealth.explain |
SHAP wrappers + Fuzzy-XGBoost hybrid explainer | ICAIHE 2026 |
fairhealth.federated |
FedAvg + differential privacy + sparsification | MedHE, CIBB 2026 |
fairhealth.datasets |
Maternal health, dengue, flood PDNA — all public | Multiple |
Quick Example
import fairhealth as fh
import numpy as np
# ── Fairness audit ───────────────────────────────────────────────
from fairhealth.fairness.metrics import demographic_parity_diff
y_pred = np.array([1, 0, 1, 0, 1, 0])
sensitive = np.array([0, 0, 0, 1, 1, 1]) # 0=young, 1=older
dpd = demographic_parity_diff(y_pred, sensitive)
print(f"Demographic Parity Difference: {dpd:.4f}")
# → 0.3333 (gap between age groups)
# ── Fuzzy risk explanation ───────────────────────────────────────
from fairhealth.explain.fuzzy import get_fired_rules, score_to_label
rules = get_fired_rules(age=42, sbp=145, bs=12, hr=88)
for rule in rules:
print(f"Rule {rule['id']}: {rule['condition']} → {rule['outcome']}")
# → Rule 1: High BP AND High Blood Sugar → HIGH RISK
# → Rule 5: High Heart Rate AND High BP → HIGH RISK
# ── Federated privacy ────────────────────────────────────────────
from fairhealth.federated.privacy import sparsify, add_gaussian_noise
weights = np.array([0.4, 0.3, 0.15, 0.1, 0.03, 0.02])
sparse, rate = sparsify(weights, sparsity=0.975)
print(f"Communication reduced by {rate:.1%}")
# → Communication reduced by 83.3%
Real Results (from My Papers)
| Finding | Value |
|---|---|
| Maternal health model accuracy | 79.3% (Fuzzy-XGBoost hybrid) |
| Clinicians preferring hybrid explanation | 71% (14 clinicians, ICAIHE 2026) |
| Demographic parity difference (age groups) | 0.1011 |
| Federated vs central accuracy gap | 9.3% |
| Communication reduction (sparsification) | 83–97.5% |
Datasets Used (All Public — No Hospital Access Needed)
| Dataset | Domain | Source |
|---|---|---|
| Maternal Health Risk | Risk prediction | UCI / Kaggle |
| Bangladesh Dengue | Symptom triage | DGHS Bangladesh |
| Bangladesh Flood PDNA 2022 | Disaster equity | Government open data |
| PTB-XL | ECG biosignals | PhysioNet (free) |
Research Papers
If my library helps your work, please cite:
@software{fairhealth2026,
author = {Yesmin, Farjana},
title = {FairHealth: Trustworthy Healthcare AI},
year = {2026},
url = {https://github.com/Farjana-Yesmin/fairhealth}
}
Related papers:
- Yesmin, F. (2026). Fairness-Aware Representation Learning for ECG-Based Disease Prediction. MobiHealth 2026.
- Yesmin, F. et al. (2026). Explainable AI for Maternal Health Risk Prediction in Bangladesh. ICAIHE 2026.
- Yesmin, F. (2026). MedHE: Communication-Efficient Privacy-Preserving Federated Learning. CIBB 2026.
- Yesmin, F. & Akter, R. (2026). Toward Equitable Recovery. CCAI 2026 (IEEE).
Author
Farjana Yesmin — ML Researcher, Trustworthy AI for Healthcare
Website: farjana-yesmin.github.io
Email: farjanayesmin76@gmail.com
License
MIT © Farjana Yesmin
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
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 fairhealth-0.1.0.tar.gz.
File metadata
- Download URL: fairhealth-0.1.0.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79355bc2a0533269da5431d4631b1e6fc9f0f918eebc8088229e6d61a8565d08
|
|
| MD5 |
a949bd5423123b525ece5ea373252c6b
|
|
| BLAKE2b-256 |
cd0d473e2d3669d2d569815d5e9a0d6945c1113da81f64df25f84caaa81e3e5e
|
File details
Details for the file fairhealth-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fairhealth-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4bd9b1934d7f666187f8e4422b84b84c8e77d9c56f20f8a50fa3a9ca7b6fb3cf
|
|
| MD5 |
cd1b04660096347e372b8fb14522ed94
|
|
| BLAKE2b-256 |
dedd8dfcb0d8259c9665ee20342bdcbbad8032a343a9ae79420330f47889f153
|