MLA-C01 Question 245
Select 4You are a Machine Learning Engineer at a company using Amazon SageMaker to train and deploy a machine learning model for predicting customer churn. The dataset contains a mix of categorical and numerical features. Which of the following steps must you take to ensure the data is prepared and suitable for training a machine learning model in SageMaker?
- A
Perform one-hot encoding on categorical features to convert them into numerical format.
- B
Normalize the numerical features to ensure they have a mean of zero and a standard deviation of one.
- C
Store the preprocessed dataset in an Amazon S3 bucket for SageMaker to access it during training.
- D
Use Amazon SageMaker Feature Store to automatically preprocess and clean the dataset.
- E
Split the dataset into training and validation sets before starting the training job.
Show answer and explanation
Correct answers: A, B, C, E
Explanation
To prepare your dataset for training in Amazon SageMaker, you must preprocess it appropriately. Categorical data must be converted into numerical format (e.g., via one-hot encoding), and numerical features should typically be normalized to avoid issues with scale. The dataset must also be split into training and validation sets to evaluate the model's performance effectively. Finally, the data must be stored in an Amazon S3 bucket, as SageMaker accesses datasets from S3 during the training process. While SageMaker Feature Store is a useful tool, it does not handle preprocessing tasks like encoding and normalization automatically.
- A. Correct.
Correct: Machine learning models typically require categorical features to be converted into numerical representations. One-hot encoding is a common technique for this.
- B. Correct.
Correct: Normalizing numerical features ensures that the model can converge more effectively during training, as the scale of the features will not dominate the learning process.
- C. Correct.
Correct: Amazon SageMaker requires the dataset to be stored in an accessible location, such as an Amazon S3 bucket, for the training job to access it.
- D. Incorrect.
Incorrect: While Amazon SageMaker Feature Store is a powerful tool for managing features, it does not automatically preprocess and clean the dataset. Preprocessing tasks must be done explicitly.
- E. Correct.
Correct: Splitting the dataset into training and validation sets is a best practice for evaluating the model's performance during training and ensuring generalizability.