MLS-C01 Question 56
Single answerA data scientist is training a machine learning model using a dataset stored in Amazon S3. The dataset contains missing values, inconsistent data formats, and categorical variables. The data scientist needs to preprocess the data before training the model. Which solution provides the most efficient and scalable way to handle these data transformations?
- A
Use Amazon SageMaker Data Wrangler to clean and preprocess the data, then export the transformed data back to Amazon S3.
- B
Manually preprocess the data using Python scripts on a local machine and upload the cleaned dataset to Amazon S3.
- C
Use AWS Glue to create an ETL job for data cleansing and transformation, and store the output in Amazon S3.
- D
Directly load the dataset into the machine learning model and let the algorithm handle the data inconsistencies.
Show answer and explanation
Correct answer: A
Explanation
Amazon SageMaker Data Wrangler is the best choice for this scenario as it offers a comprehensive suite of tools for data preprocessing specifically tailored to machine learning workflows. It simplifies the process of handling missing values, inconsistent formats, and categorical variables, while also integrating seamlessly with other AWS services such as Amazon S3. This makes it the most efficient and scalable solution for the given task.
- A. Correct.
Amazon SageMaker Data Wrangler is specifically designed for data preprocessing tasks, including handling missing values, inconsistent data formats, and categorical variables. It provides a user-friendly interface and integrates seamlessly with Amazon S3.
- B. Incorrect.
While manually preprocessing data using Python scripts is possible, it is not scalable or efficient, especially for large datasets stored in Amazon S3. This approach does not leverage AWS's managed services.
- C. Incorrect.
AWS Glue is primarily used for ETL (Extract, Transform, Load) tasks and is ideal for large-scale data integration. However, for tasks specific to ML preprocessing, such as handling missing values and categorical encoding, SageMaker Data Wrangler is more suitable.
- D. Incorrect.
Directly loading the dataset into the machine learning model without preprocessing is not recommended. ML algorithms generally require clean and consistent input data to perform effectively.