MLS-C01 Modeling Practice Question
A data scientist is using Amazon SageMaker to train a classification model. The dataset contains categorical features with high cardinality. Which encoding method is most appropriate for handling high-cardinality categorical features in a linear model?
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
One-hot encoding creates many binary columns, which can cause the curse of dimensionality for high-cardinality features. Label encoding assigns arbitrary integers, which linear models may interpret as ordinal. Target encoding (mean encoding) replaces categories with the mean of the target variable, which captures information without expanding dimensionality. This is often used for high-cardinality features. Ordinal encoding is similar to label encoding.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Target encoding
Why this is correct
Target encoding replaces categories with the mean of the target variable, reducing dimensionality and capturing predictive power.
- ✗
Label encoding
Why it's wrong here
Label encoding assigns arbitrary integers, which linear models may interpret as ordinal relationships.
- ✗
One-hot encoding
Why it's wrong here
One-hot encoding creates many features, which can lead to high dimensionality and sparsity.
- ✗
Ordinal encoding
Why it's wrong here
Ordinal encoding is similar to label encoding and not suitable for non-ordinal categories.
Go deeper
Related to this question
About these practice questions
One of 1,672 original MLS-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.