compileml.fairness

reason_parity

def reason_parity(decisions, protected, *, labels=None, top_n: int = 5) -> dict

from compileml.fairness import reason_parity

§10 — are the same reasons cited to both groups?

Regulatory rather than statistical: this is about what applicants are *told*. A systematic difference in cited reasons is a finding even when approval rates match exactly.

Note what is being counted. reasons_negative is the adverse-action code the applicant would actually be sent, produced by the same runtime that produced the decision — not a feature-importance ranking standing in for one. The audit is of disclosed reasons, not of a proxy for them.

Parameters#

NameTypeDefaultKind
decisions—requiredpositional
protected—requiredpositional
labels—Nonekeyword-only
top_nint5keyword-only

Returns#

dict