MLS-C01 Modeling Practice Question
A data scientist is using Amazon SageMaker to train a gradient boosting model on a dataset with categorical features. The dataset contains a column 'UserID' with over 1 million unique values. The training is taking very long and the model size is large. Which technique would MOST effectively reduce training time and model size while maintaining accuracy?
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 feature hashing to UserID.
Hashing reduces the number of distinct categories to a fixed number of buckets, controlling dimensionality. Option A is wrong because one-hot encoding would explode the feature space. Option C is wrong because label encoding creates ordinal relationships that may mislead the model. Option D is wrong because removing UserID likely loses important signal.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use one-hot encoding on UserID.
Why it's wrong here
One-hot encoding would create over 1 million binary columns, increasing training time and model size dramatically.
- ✓
Apply feature hashing to UserID.
Why this is correct
Feature hashing maps user IDs to a fixed number of buckets (e.g., 2^14), reducing dimensionality and preserving some signal.
- ✗
Use label encoding for UserID.
Why it's wrong here
Label encoding assigns integers 0 to N-1, which the tree model may misinterpret as ordinal, causing splits that are not meaningful.
- ✗
Remove UserID from the dataset.
Why it's wrong here
Removing UserID may discard important user-specific patterns, likely reducing accuracy.
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.