compileml.fairness

representation

def representation(y, protected, *, labels=None, X=None, feature_names=None) -> dict

from compileml.fairness import representation

§1 — who is in the population, and what their observed rates are.

Also reports per-feature distribution divergence when X is given, so a reviewer can see which *inputs* differ before asking why scores do. A score gap explained entirely by an input gap is a different conversation from one that is not.

Parameters#

NameTypeDefaultKind
y—requiredpositional
protected—requiredpositional
labels—Nonekeyword-only
X—Nonekeyword-only
feature_names—Nonekeyword-only

Returns#

dict