MLA-C01 Data Preparation for Machine Learning Practice Question
A data scientist is using SageMaker Data Wrangler to prepare a dataset for a binary classification model. The dataset contains a mix of numerical and categorical features. The scientist wants to perform feature engineering to improve model performance. Which TWO actions are appropriate for handling categorical features in Data Wrangler? (Choose two.)
⚠ Common exam trap
The trap here is assuming that numerical transforms like scaling or PCA can be applied to categorical features without encoding; they cannot and will cause errors.
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
✓
Apply one-hot encoding to categorical features with low cardinality.
Categorical features need to be encoded into numerical representations before training. One-hot encoding is effective for low-cardinality features, creating binary indicators. Target encoding is suitable for high-cardinality features, replacing categories with target statistics and reducing dimensionality. Both are available as transforms in SageMaker Data Wrangler. Scaling, PCA, and log transformations are designed for numerical features and are not applicable to categorical data.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Apply one-hot encoding to categorical features with low cardinality.
Why this is correct
One-hot encoding is a standard technique for converting categorical variables into a numerical format suitable for many machine learning algorithms. It creates binary columns for each category. For low-cardinality features (few unique values), this is efficient and avoids the curse of dimensionality. Data Wrangler provides a 'One-Hot Encoding' transform that can be applied directly.
- ✓
Apply target encoding to categorical features with high cardinality.
Why this is correct
Target encoding replaces each category with the mean of the target variable for that category. It is particularly useful for high-cardinality features because it reduces dimensionality and captures the relationship with the target. Data Wrangler offers a 'Target Encoding' transform that can be used for this purpose, making it a suitable action for categorical feature engineering.
- ✗
Apply PCA to categorical features for dimensionality reduction.
Why it's wrong here
Principal Component Analysis (PCA) is a dimensionality reduction technique for numerical data. It cannot be directly applied to categorical features without first encoding them. Even then, PCA assumes linear relationships and may not be ideal for categorical data. Thus, it is not a direct action for handling categorical features in Data Wrangler.
- ✗
Apply log transformation to categorical features.
Why it's wrong here
Log transformation is a mathematical operation applied to numerical data to reduce skewness. It is not defined for categorical data, which consists of labels or categories. Attempting to apply it would result in errors. Therefore, this action is not appropriate for categorical features.
- ✗
Apply min-max scaling to categorical features.
Why it's wrong here
Min-max scaling is a technique for numerical features to bring them into a specific range. It is not applicable to categorical features because it requires numerical input. Applying it to categorical data would be meaningless and could lead to errors. Therefore, this action is not appropriate for handling categorical features.
Go deeper
Related to this question
About these practice questions
This MLA-C01 question is part of Courseiva's 665-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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint
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.