MLA-C01 Question 86
Select 3You are developing a machine learning model for a retail company that predicts customer churn. The company collects customer data, such as purchase history, demographics, and website interactions, and stores it in Amazon S3. You want to train a model using SageMaker. Before starting the training job, you need to preprocess the raw data and handle missing values. Which of the following steps should you take to efficiently prepare the data for training using AWS services?
- A
Use AWS Glue to clean and transform the data, and output the processed data to a new S3 bucket for training.
- B
Use Amazon SageMaker Processing Jobs to handle missing values and perform feature engineering on the raw data.
- C
Copy the raw data from Amazon S3 to a local machine, preprocess it using a Python script, and upload it back to S3.
- D
Directly train the model in SageMaker without preprocessing, as SageMaker automatically handles missing values during training.
- E
Use Amazon Athena to query the raw data in S3, handle missing values via SQL queries, and store the cleaned data back to S3.
Show answer and explanation
Correct answers: A, B, E
Explanation
Efficient data preprocessing is a critical step in machine learning workflows. AWS Glue and SageMaker Processing Jobs are designed for scalable and efficient data preparation workflows. Additionally, Amazon Athena provides a serverless solution for querying and transforming data stored in Amazon S3. Copying data to a local machine is not scalable, and SageMaker does not automatically handle missing values, so these are not valid options.
- A. Correct.
AWS Glue is a serverless data integration service that can transform and clean data effectively. It is suitable for preparing data stored in S3 for machine learning tasks.
- B. Correct.
Amazon SageMaker Processing Jobs allow you to preprocess data directly within the SageMaker environment, making it convenient for handling missing values and performing feature engineering.
- C. Incorrect.
Copying data to a local machine for preprocessing is not efficient or scalable, especially when dealing with large datasets commonly used in machine learning.
- D. Incorrect.
SageMaker does not automatically handle missing values during training. Preprocessing steps need to be explicitly performed before starting the training job.
- E. Correct.
Amazon Athena can query data stored in S3 and perform transformations using SQL. It is useful for handling missing values and preparing data for machine learning tasks.