Courseiva
Exploratory Data AnalysismediumMultiple SelectObjective-mapped

MLS-C01 Exploratory Data Analysis Practice Question

Which TWO actions are appropriate during exploratory data analysis when you discover that a categorical feature has 50 unique values (high cardinality)?

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

Group rare categories into a single 'Other' category.

Options A and E are correct. A: Grouping rare categories into an 'Other' category reduces cardinality while preserving information, which is appropriate for high-cardinality categorical features. E: Feature hashing (hashing trick) transforms high-cardinality features into a fixed-size vector, reducing dimensionality. Option B is incorrect because one-hot encoding with 50 categories creates many sparse columns, which can be problematic for model performance and memory. Option C is incorrect because label encoding implies an ordinal relationship, which may not exist, and can mislead models. Option D is incorrect because dropping the feature may lose important information; other techniques like grouping or hashing are preferable.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Group rare categories into a single 'Other' category.

    Why this is correct

    Reduces cardinality while keeping most information.

  • Apply one-hot encoding to create 50 dummy variables.

    Why it's wrong here

    One-hot encoding creates many columns, increasing dimensionality.

  • Apply label encoding to assign integers to each category.

    Why it's wrong here

    Label encoding implies order, which may be inappropriate.

  • Drop the feature entirely.

    Why it's wrong here

    May lose valuable information.

  • Use feature hashing (hashing trick) to reduce dimensionality.

    Why this is correct

    Hashing transforms high-cardinality features to a fixed size.

About these practice questions

This MLS-C01 question is part of Courseiva's 1,672-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 →

How Courseiva writes practice questions · Editorial policy

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.