MLS-C01 Modeling Practice Question
A data scientist is building a model to predict customer churn. The dataset has 20 features, including categorical variables with high cardinality (e.g., ZIP code). The data scientist wants to use a linear model. Which feature engineering technique is MOST appropriate for the high-cardinality categorical features?
⚠ Common exam trap
AWS often tests the trap that candidates default to one-hot encoding for all categorical variables, failing to recognize that high cardinality makes it impractical for linear models, whereas target encoding is a more efficient alternative that preserves feature information without dimensionality explosion.
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
✓
Target encoding
Target encoding is the most appropriate technique for high-cardinality categorical features when using a linear model because it replaces each category with the mean of the target variable for that category, creating a numeric feature that captures the relationship between the category and the target without exploding the feature space. One-hot encoding would create an unmanageable number of binary columns (e.g., thousands of ZIP codes), leading to the curse of dimensionality and making the linear model unstable or computationally infeasible.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
One-hot encoding
Why it's wrong here
One-hot encoding leads to high dimensionality.
- ✓
Target encoding
Why this is correct
Target encoding handles high cardinality well.
- ✗
TF-IDF
Why it's wrong here
TF-IDF is for text data.
- ✗
Standard scaling
Why it's wrong here
Scaling is for numerical features.
Go deeper
Related to this question
About these practice questions
Courseiva writes every MLS-C01 question from scratch — 1,672 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This MLS-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 MLS-C01 exam.