Responsible machine learning
Document data, measure subgroup performance and decide when not to ship.
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.
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
MediumDocument the scope
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 inFinished reading?
Lock in what you just learned.
0%
Mark this lesson complete to save your place and move one step closer to the certificate.