API Reference
compileml.fairness
Audit compiled decisions by group: outcomes, predictive performance, and how the model behaves locally. Evidence for a validator, not a compliance certificate.
import compileml.fairness
class FairnessAuditThree-layer fairness audit over compiled decisions.approval_rates()§3 — approval rate per group, with the adverse impact ratio.attribution_concentration()§8 — how many drivers it takes to explain a decision, per group.attribution_disparity()§6 — decompose the mean group score gap by feature, exactly.boundary_fragility()§9 — how close each group sits to the cutoff.calibration_by_group()§4 — is the calibrated PD equally honest per group?counterfactual()§11 — flip the protected attribute and see whether decisions move.error_rates()§5 — FPR, FNR, precision and recall per group.feature_swing()§7 — how far each feature *can* move a score, per group.model_interaction_structure()Model-level context for §8: how much of the card is pairwise at all.reason_parity()§10 — are the same reasons cited to both groups?representation()§1 — who is in the population, and what their observed rates are.score_distribution()§2 — group score distributions, KS and Wasserstein.wilson_interval()Wilson score interval — behaves sanely on small groups, unlike normal.