Fairlearn¶
Overview¶
Fairlearn is an open-source Python toolkit for assessing and improving the fairness of machine-learning models. In the wizard post it is the tool that makes algorithmic accountability "approachable" — the mechanism for auditing "the models that allocate capital." Its homepage is fairlearn.org.
Key Facts¶
- Core API used in the post:
MetricFrame(computes metrics disaggregated by a sensitive feature), plus the metric helpersselection_rateanddemographic_parity_difference. - Usage pattern: pass
y_true,y_pred, andsensitive_features(e.g. a zip-code-derived demographic) toMetricFrame; inspectmetrics.by_group; compute the demographic-parity gap as a single number. - Sibling tool: the post names IBM's AI Fairness 360 (AIF360) (aif360.res.ibm.com) as an equivalent alternative; both fill the same role and are not given separate treatment here.
- Reference: the post links the Fairlearn user guide under Further Reading.
Connections¶
- Algorithmic Accountability — the concept Fairlearn operationalizes; see that page for the full code example and decision rule.
Sources¶
- Wizard Topples Capitalist Dominance Ingeniously — "Example 2: Algorithmic Accountability Check."