CoolFace
Apppublic

9mark9/ml-fairness-audit-demo

sourceHugging Facemitupdated 3mo agoView on Hugging Face
0likes
App README

⚖️ ML Fairness Audit

Interactive demo of the genuine fairness-audit engine from `shaikn6/ml-fairness-audit`. The audit/ package (fairness metrics + regulatory bias detector) is vendored unmodified — no logic was reimplemented and no numbers are fabricated.

What it does

Given a model's predictions over a protected attribute, it computes three ECOA / Fair-Lending fairness metrics and applies the project's regulatory thresholds:

MetricMeaningPass rule
Disparate Impact Ratiominority approval ÷ reference approval≥ 0.80 (EEOC 4/5ths rule)
Demographic Parity Differencegap in approval rate vs reference≤ 0.10
Equalized Odds Differencegap in TPR/FPR vs reference≤ 0.10

A Disparate Impact Ratio below 0.80 is flagged as a Critical ECOA violation (15 U.S.C. § 1691, the EEOC 4/5ths rule).

How to use

  • Bundled sample — audits a synthetic 4,000-row loan dataset with a deliberate 15pp approval penalty against Black & Hispanic applicants. A logistic scorecard trained on the data (incl. the protected attribute) reproduces the historical bias, so the audit surfaces real disparate impact. Choose race, gender, or age_group.
  • Upload CSV — provide a CSV with a binary label column (0/1), one or more numeric feature columns, and a categorical protected-attribute column.

Stack

Pure CPU — scikit-learn, pandas, numpy, matplotlib, gradio. No GPU, no external API keys.


Source: <https://github.com/shaikn6/ml-fairness-audit> · Contact: nagizaazs@gmail.com