Courseiva
Data Preparation for Machine LearninghardMultiple ChoiceObjective-mapped

MLA-C01 Data Preparation for Machine Learning Practice Question

A company is preparing a dataset with a categorical feature that has over 1000 unique values. They need to create features for a random forest model. Which feature engineering approach is most scalable and effective in AWS for high-cardinality categories?

⚠ Common exam trap

AWS often tests the misconception that one-hot encoding is always safe for categorical features, but the trap here is that high-cardinality categories require a dimensionality-reduction technique like target encoding, not a naive expansion that breaks scalability.

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 with smoothing using SageMaker Data Wrangler

Target encoding with smoothing in SageMaker Data Wrangler is the most scalable and effective approach because it replaces each high-cardinality category with the mean of the target variable, smoothed by a global prior to prevent overfitting. SageMaker Data Wrangler handles datasets with over 1000 unique values efficiently without exploding feature dimensions, unlike one-hot encoding, and avoids the ordinal bias of 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.

  • Hash encoding using Apache Spark on Amazon EMR

    Why it's wrong here

    Hash encoding may cause collisions and lose interpretability, though scalable.

  • One-hot encoding using SageMaker Processing with scikit-learn

    Why it's wrong here

    One-hot encoding with 1000+ categories produces a very wide dataset, inefficient for training.

  • Label encoding using Pandas in a SageMaker notebook

    Why it's wrong here

    Label encoding imposes arbitrary ordinal relationships, misleading tree-based models.

  • Target encoding with smoothing using SageMaker Data Wrangler

    Why this is correct

    Target encoding reduces cardinality and is effective for tree models; Data Wrangler integrates natively.

About these practice questions

Courseiva writes every MLA-C01 question from scratch — 835 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.