Courseiva
Data Preparation for Machine LearningmediumMultiple ChoiceObjective-mapped

MLA-C01 Data Preparation for Machine Learning Practice Question

A retail company is preparing a dataset for a machine learning model to predict customer churn. The dataset includes customer_id, signup_date, last_purchase_date, total_purchases, average_order_value, and churn_label. The data scientist notices that the 'total_purchases' column has missing values for 15% of the records. The company wants to use AWS Glue for data preparation. Which approach should the data scientist take to handle the missing values while minimizing bias and preserving data integrity?

⚠ Common exam trap

Test-takers frequently choose simple imputation (mean/median) or deletion without considering the bias introduced when missing data is not MCAR, and they overlook that AWS Glue DynamicFrames can support custom model-based imputation within the ETL pipeline.

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

Use AWS Glue DynamicFrame to perform model-based imputation, predicting missing total_purchases using other features like average_order_value and signup_date.

Model-based imputation uses relationships between features (e.g., average_order_value and signup_date) to predict missing total_purchases values, minimizing bias compared to simple mean/median imputation. AWS Glue DynamicFrames support custom transformation logic, allowing you to implement a predictive model (e.g., using Spark MLlib) directly within the Glue ETL job. This approach preserves data integrity by leveraging existing data patterns rather than discarding records or introducing arbitrary constants.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use AWS Glue DataBrew to fill missing values with the median of total_purchases.

    Why it's wrong here

    Median imputation, like mean imputation, does not preserve the distribution and can introduce bias.

  • Drop all records with missing total_purchases values.

    Why it's wrong here

    Dropping 15% of records reduces sample size and may bias the model if missingness is not random.

  • Use AWS Glue DynamicFrame to perform model-based imputation, predicting missing total_purchases using other features like average_order_value and signup_date.

    Why this is correct

    Model-based imputation leverages correlated features to estimate missing values more accurately, reducing bias.

  • Replace missing total_purchases with the mean of the non-missing values.

    Why it's wrong here

    Mean imputation reduces variance and can distort relationships between variables.

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 →

How Courseiva writes practice questions · Editorial policy

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.