Validate data quality and manage bias
Unlock the complete study guide.
Bundled into the existing AWS Certified Machine Learning Engineer - Associate premium course — no separate purchase.
14-day money-back guarantee — no questions asked.
Included in this chapter:
- Data quality and bias checks on a training dataset
- Choose where data quality checks run
- Write DQDL rules that state the real requirement
- Gate the pipeline on a failed check
- Fill missing values without hiding them
- Handle outliers according to what they are
- Find exact and near-duplicate records
- Choose the Ground Truth task type
- Choose the Ground Truth workforce
- Automate labeling with Ground Truth
- Audit label quality
- Split data so the test score stays honest
- Measure data bias with pretraining metrics
- Trace a disparity to its collection or labeling cause
- Resolve class imbalance
- Validate generative AI training data
Data Wrangler split transforms by what the evaluation must prove
| Criterion | Randomized split | Ordered split | Stratified split | Split by key |
|---|---|---|---|---|
| What it guarantees | Each split is a random, non-overlapping sample | The first observations go to training and the last to testing, keeping their order | Each value of the input column keeps about the same proportion in every split | No value of the key columns appears in more than one split |
| Use when the evaluation must prove | Performance on new, independent rows | Prediction of later events from earlier data | Performance on every class, including rare ones | Performance on unseen entities such as customers or patients |
| What it does not do | Keep an entity's rows or the time order together | Balance classes or mix time periods | Balance the classes: it keeps the existing proportions | Preserve class proportions or time order |
| Constraint to know | Can take longer than an ordered split on large datasets | Orders by dataset sequence or by an optional numeric input column | Input column can have at most 100 unique values | You name the key columns whose values must not be shared |
Decision tree
Cheat sheet
Unlock with Premium — includes all practice exams and the complete study guide.
Also tested in
References
- https://docs.aws.amazon.com/prescriptive-guidance/latest/ml-operations-planning/splits-leakage.html
- https://docs.aws.amazon.com/aws-certification/latest/machine-learning-engineer-associate-02/machine-learning-engineer-associate-02-domain1.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-availability-change.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/sms-automated-labeling.html
- https://docs.aws.amazon.com/glue/latest/dg/glue-data-quality.html
- https://docs.aws.amazon.com/databrew/latest/dg/profile.data-quality-rules.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/data-wrangler-data-insights.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/data-wrangler.html
- https://docs.aws.amazon.com/glue/latest/dg/dqdl.html
- https://docs.aws.amazon.com/glue/latest/dg/dqdl-rule-types.html
- https://docs.aws.amazon.com/glue/latest/dg/dqdl-rule-types-AggregateMatch.html
- https://docs.aws.amazon.com/glue/latest/dg/tutorial-data-quality.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/data-wrangler-transform.html
- https://docs.aws.amazon.com/databrew/latest/dg/recipe-actions.FLAG_OUTLIERS.html
- https://docs.aws.amazon.com/glue/latest/dg/machine-learning.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/sms-image-classification.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/sms-bounding-box.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/sms-semantic-segmentation.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/sms-named-entity-recg.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/sms-workforce-management.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/sms-workforce-private.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/sms-verification-data.html
- https://docs.aws.amazon.com/wellarchitected/latest/responsible-ai-lens/raidp02-bp03.html
- https://aws.amazon.com/what-is/data-augmentation/
- https://aws.amazon.com/blogs/machine-learning/detect-fraudulent-transactions-using-machine-learning-with-amazon-sagemaker/
- https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_AlgorithmSpecification.html
- https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ShuffleConfig.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-measure-data-bias.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/xgboost_hyperparameters.html
- https://docs.aws.amazon.com/nova/latest/nova2-userguide/nova-data-prep-sft-2.html
- https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-use-independent-api.html