MLA-C01 Data Preparation for Machine Learning Practice Question
A healthcare startup is building a model to predict patient readmission within 30 days. The data is stored in Amazon Redshift and includes patient demographics, admission history, lab results, and medication records. The data scientist extracts a sample of 10,000 records to Amazon S3 as CSV files for initial prototyping. During exploratory data analysis, they find that the 'age' column has values like '150', '0', and negative numbers. The 'diagnosis_code' column contains codes like 'E11', 'E11.9', and 'e11' (inconsistent formatting). The 'readmitted' target column has 60% 'Yes' and 40% 'No'. The data scientist wants to use AWS Glue DataBrew for data cleaning. Which combination of steps should they use?
⚠ Common exam trap
Candidates often assume SMOTE or Standard Scaler are available in DataBrew, but AWS Glue DataBrew has a limited set of built-in ML transforms (e.g., Random Oversampling, Random Undersampling) and does not include SMOTE or Standard Scaler, which are typically handled in Amazon SageMaker or custom scripts.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
In AWS Glue DataBrew: 1) Filter age between 0 and 120 to remove invalid values. 2) Standardize diagnosis_code to uppercase using a formula. 3) Apply Random Oversampling to balance the target column.
It uses AWS Glue DataBrew's built-in capabilities to filter invalid age values (0–120), standardize the diagnosis_code to uppercase via a formula, and apply Random Oversampling to address the 60/40 class imbalance. DataBrew supports filtering, formula-based transformations, and built-in ML transforms like Random Oversampling, making this combination valid and efficient for data cleaning.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
In AWS Glue DataBrew: 1) Filter age between 0 and 120 to remove invalid values. 2) Standardize diagnosis_code to uppercase using a formula. 3) Apply Random Oversampling to balance the target column.
Why this is correct
Filtering removes invalid ages, standardizing codes ensures consistency, and oversampling addresses imbalance.
- ✗
In AWS Glue DataBrew: 1) Impute age with the mean. 2) Apply Standard Scaler to all numeric columns. 3) Use Random Oversampling to balance the target column.
Why it's wrong here
Imputing with mean does not remove invalid values like negative ages, and Standard Scaler may not be appropriate for all numeric columns.
- ✗
In AWS Glue DataBrew: 1) Replace age with median. 2) Convert diagnosis_code to uppercase. 3) Apply SMOTE to balance the target column.
Why it's wrong here
Replacing with median does not remove invalid values, and SMOTE may create synthetic samples that are not realistic for categorical data.
- ✗
In AWS Glue DataBrew: 1) Remove rows where age is outside 0-120. 2) Drop diagnosis_code column. 3) Use Random Undersampling to balance the target column.
Why it's wrong here
Dropping diagnosis_code loses potentially important information, and undersampling reduces sample size.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
This MLA-C01 question is part of Courseiva's 835-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This MLA-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MLA-C01 exam.