Machine Learning Basics·Machine learning from data to a responsible model

Responsible machine learning

Document data, measure subgroup performance and decide when not to ship.

Intermediate 16 min read Lesson 10 of 300 Challenge included
What you will be able to do
  • Write a model card with intended and out-of-scope uses.
  • Measure performance by subgroup.
  • Keep a human override for consequential decisions.
  • Monitor drift after deployment.

In plain English

A model affects people. Check performance across groups, document the data and the intended use, and build a way to appeal or override. If you cannot explain the failure modes, you are not ready to ship.

subgroups.pyPython
import pandas as pd

results = pd.DataFrame({'group': group, 'actual': y_test, 'pred': pred})
summary = results.groupby('group').apply(
    lambda d: (d['actual'] == d['pred']).mean(),
    include_groups=False,
)
print(summary)
Your turn

Document the scope

Medium

Write two sentences describing the intended use and one out-of-scope use for a course-recommendation model.

PYTHON · starter
model_card =
Check your understanding before moving on.
Knowledge checkQuestion 1

Why measure subgroup performance?

Select an answer to continue
Study tools

Make it yours.

Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.

Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign in
Finished reading?

Lock in what you just learned.

Mark this lesson complete to save your place and move one step closer to the certificate.

Lesson 10 of 300 · 0% of course