Domain 1 of 4 · Chapter 3 of 3

Data Integrity & Preparation

Unlock the complete study guide + 1,040 practice questions across 16 full exams.

Bundled into the existing AWS Certified Machine Learning Engineer - Associate premium course — no separate purchase.

Included in this chapter:

  • Pre-training bias: CI and DPL on the raw dataset
  • Fixing class imbalance: resampling vs synthetic data
  • Validating quality and protecting regulated data
  • Exam-pattern recognition: pick the right tool

Choosing a data-validation tool before training

CapabilityGlue Data QualityGlue DataBrewSageMaker Clarify (pre-training)
Primary jobRule-based quality checks (DQDL)Visual profiling + no-code cleaningBias detection (CI, DPL, and more)
What it answersAre values correct and complete?What does the data look like, and clean itIs a facet under-represented or mislabeled?
How rules are definedDQDL rules, auto-recommended from Catalog dataPoint-and-click profiling and transformsConfigure facet, label, and metric set
Built on / outputOpen-source DeeQu; data-quality score (% rules passing)250+ built-in transforms; profile reportModel-agnostic metrics on the raw dataset
Best fitAutomated quality gates in ETL / CatalogExploratory cleanup without writing codeFairness audit of training data before training

Decision tree

Concern is fairness / bias? yes no Raw dataset, before training? yes no: over time Clarify pre-training bias (CI, DPL) model-agnostic Model Monitor bias drift in production (not pre-training) Concern is data correctness? yes no Glue Data Quality (DQDL) rule-based automated gates or Glue DataBrew visual no-code cleaning Protect data Macie: find PII in S3 KMS / SSE-KMS: encrypt Always: rebalance before splitting, split before training, keep PII out of features and place data in the Region data-residency rules permit

Cheat sheet

  • SageMaker Clarify measures bias on the dataset before training, model-agnostically
  • Class Imbalance (CI) measures sample counts and ranges from -1 to +1
  • DPL measures uneven positive-outcome rates across facets
  • Clarify reports eight pre-training bias metrics, with CI and DPL the headline pair
  • Pre-training bias is Clarify; bias drift in production is Model Monitor
  • Fix a starved minority class by rebalancing: resample or generate synthetic data
  • SMOTE-style synthetic data interpolates new minority points, not duplicates
  • Rebalance before you split, and never resample across the train/test boundary
  • Split into train/validation/test and shuffle to prevent order leakage
  • AWS Glue Data Quality uses DQDL rules and reports a data quality score
  • Glue Data Quality: rule recommendations from the Catalog, failing-record detection from ETL
  • AWS Glue DataBrew is visual, no-code profiling and cleaning
  • Encrypt ML data at rest with S3 SSE-KMS and in transit with TLS
  • Amazon Macie discovers sensitive data in S3 using managed data identifiers
  • Anonymize or mask identifiers before they reach the feature set
  • Data residency fixes the Region for the bucket and training resources
  • Glue Data Quality dynamic rules adapt thresholds to history with last()
  • Glue Data Quality static rules gate loads; Fail-without-loading stops bad data
  • A DataBrew profile job generates data-quality statistics with no code
  • Model Monitor baselines the training data, then reports drift in constraint_violations.json
  • DataCaptureConfig samples and encrypts endpoint traffic for Model Monitor

Unlock with Premium — includes all practice exams and the complete study guide.

Also tested in

References

  1. Pre-training Bias Metrics — Amazon SageMaker Clarify
  2. AWS Glue Data Quality
  3. What is AWS Glue DataBrew?
  4. Using server-side encryption with AWS KMS keys (SSE-KMS) — Amazon S3
  5. What is AWS Key Management Service?
  6. What is Amazon Macie?