Ethical AI · Intermediate level

Intermediate level · Module 4 of 7 · 15 guided hours

AI Fairness Metrics and Evaluation

The main group fairness definitions (demographic parity, equal opportunity and equalised odds), how to compute them with Fairlearn's MetricFrame, why they can conflict and how to choose metrics that fit the decision.

Learning objectives

  • Define and calculate the main group fairness metrics
  • Use Fairlearn's MetricFrame for disaggregated evaluation
  • Choose and justify fairness metrics for a specific decision

Topics

  • demographic parity
  • equal opportunity and equalised odds
  • MetricFrame and by-group metrics
  • differences and ratios
  • incompatibility of fairness definitions
  • choosing metrics with stakeholders

Lessons

  1. Lesson 1 Group Fairness Definitions

    Clear definitions, with small worked numbers, of demographic parity, equal opportunity and equalised odds, and of what each one protects.

    demographic parityequal opportunityequalised oddstrue positive ratefalse positive rate

  2. Lesson 2 Disaggregated Evaluation with Fairlearn MetricFrame

    Learners use Fairlearn's MetricFrame to compute several metrics for each group in one step, and the summary functions to report differences and ratios between groups.

    MetricFrameby_groupdifference()ratio()sensitive_features

  3. Lesson 3 Trade-offs and Choosing Fairness Metrics

    Why fairness definitions usually cannot all be satisfied at once, how fairness relates to accuracy, and how to choose metrics together with the people affected.

    incompatibilitydifferent base ratesaccuracy-fairness trade-offstakeholder inputmetric rationale

Practical activity

Complete the fairness evaluation section of the level project: a MetricFrame report by group and intersection, the chosen metrics with a written rationale and a statement of which gaps exceed the action threshold.

Expected outcomes

  • Ability to calculate and interpret fairness metrics
  • A justified, documented metric choice

Assessment

A short test on metric definitions and hand calculations (30%) and the marked fairness evaluation section (70%).

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.