服务 · Machine Learning · 基于 AIF-C01
Amazon SageMaker Clarify
Pre-training bias metrics, facet and label setup, and how to read the report. Closed to new customers.
本课尚未翻译,暂以英文显示。
你在AI Practitioner中已学过
- Clarify finds bias in data and models and explains predictions.
- It runs as a processing job and writes a report.
- Bias can be measured before and after training.
- 1Provide the dataset.
- 2Set the label, positive value, facet and facet value.
- 3Run the analysis job.
- 4Read the bias metrics, then rebalance the data.
分步说明
- 1Provide the dataset.
- 2Set the label, positive value, facet and facet value.
- 3Run the analysis job.
- 4Read the bias metrics, then rebalance the data.
Configure label and facet, run the analysis, read the report, rebalance.
Class imbalance
- Measures
- Group sizes
- Read it as
- 0 equal, near 1 or -1 skewed
Label proportions
- Measures
- Positive label share
- Read it as
- 0 equal
KL divergence
- Measures
- Label distributions
- Read it as
- 0 identical, larger differs
JS divergence
- Measures
- Label distributions
- Read it as
- Symmetric and bounded
| Metric | Measures | Read it as |
|---|---|---|
| Class imbalance | Group sizes | 0 equal, near 1 or -1 skewed |
| Label proportions | Positive label share | 0 equal |
| KL divergence | Label distributions | 0 identical, larger differs |
| JS divergence | Label distributions | Symmetric and bounded |
1 / 2
Class imbalance
- Measures
- Group sizes
- Read it as
- 0 equal, near 1 or -1 skewed
Label proportions
- Measures
- Positive label share
- Read it as
- 0 equal
KL divergence
- Measures
- Label distributions
- Read it as
- 0 identical, larger differs
| Metric | Measures | Read it as |
|---|---|---|
| Class imbalance | Group sizes | 0 equal, near 1 or -1 skewed |
| Label proportions | Positive label share | 0 equal |
| KL divergence | Label distributions | 0 identical, larger differs |
2 / 2
JS divergence
- Measures
- Label distributions
- Read it as
- Symmetric and bounded
| Metric | Measures | Read it as |
|---|---|---|
| JS divergence | Label distributions | Symmetric and bounded |
是什么
Status as of 2026-11-25: Amazon SageMaker Clarify has been closed to new customers since 2026-07-30, and existing customers can keep using it with no new features planned. AWS documentation points to computing the same standardized bias formulas with pandas and scikit-learn, SHAP for explanations, and Bedrock Evaluations for foundation models. The exam guide still names these metrics, so know them.
是什么
To measure bias before training, set up three things. The label is the outcome column and which value is the positive result, such as loan approved. The facet is the sensitive attribute, such as gender or age group. The facet value (or a threshold for numbers) says which group you check, the sensitive group. A processing job runs the analysis on the dataset and writes a report.
是什么
Class imbalance (CI) compares group sizes: it ranges from -1 to 1, and 0 means equal numbers. Difference in proportions of labels (DPL) compares the share of positive labels between groups: 0 means equal. Kullback-Leibler (KL) and Jensen-Shannon (JS) divergence compare the full label distributions of the groups: 0 means identical, and larger means more different, with JS bounded and symmetric. Read the report: a CI far from 0 means one group is small, so add or reweight data. A DPL far from 0 means labels differ by group, so review the labels and the process that made them.
是什么
For text and image data, the metrics need a table: one row per item, with its facet value (for example the dialect of a speaker or the source group of a photo) and its label. Compute the metrics on that table, then rebalance by collecting, sampling or augmenting the thin groups.
要记住
- Status 2026-11-25: closed to new customers since 2026-07-30. Existing customers can keep using it.
- Set the label, the positive value, the facet and the facet value.
- CI: group sizes, -1 to 1. DPL: positive label share by group, 0 is equal.
- KL and JS divergence: compare label distributions, 0 is identical.
要记住
- For text and image data, build a table of facet and label per item.
- A bad value points to rebalancing data or reviewing labels.
考试中
- “One group has far fewer training examples” points to class imbalance, so add or reweight data.
- “Approval rates in the labels differ by gender” points to difference in proportions of labels.
- “Measure bias before training” points to pre-training bias metrics.