compileml.fairness

calibration_by_group

def calibration_by_group(decisions, y, protected, *, labels=None, n_bins: int = 10) -> dict

from compileml.fairness import calibration_by_group

§4 — is the calibrated PD equally honest per group?

A model can pass every outcome test and still be systematically over-predicting risk for one group. That is its own finding, and it is invisible at the outcome layer.

Parameters#

NameTypeDefaultKind
decisions—requiredpositional
y—requiredpositional
protected—requiredpositional
labels—Nonekeyword-only
n_binsint10keyword-only

Returns#

dict