Courseiva
Exploratory Data AnalysiseasyMultiple ChoiceObjective-mapped

MLS-C01 Exploratory Data Analysis Practice Question

During exploratory data analysis, a data scientist notices that a categorical feature 'city' has over 1,000 unique values. The dataset has 10,000 rows. Which technique should the scientist consider to reduce the cardinality of this feature?

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 low-frequency categories into a single 'other' category.

Grouping rare categories into an 'other' bucket is a common technique to reduce cardinality. Option A (label encoding) assigns numeric labels but still has 1000 unique values. Option B (grouping into 'other') reduces cardinality. Option C (one-hot encoding) would create too many columns. Option D (frequency encoding) replaces categories with frequency but still has 1000 values.

Answer analysis

Option-by-option breakdown

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

  • Apply label encoding to assign numeric labels.

    Why it's wrong here

    Label encoding reduces cardinality but preserves the number of unique values.

  • Group low-frequency categories into a single 'other' category.

    Why this is correct

    Grouping rare categories reduces cardinality effectively.

  • Apply one-hot encoding to all categories.

    Why it's wrong here

    One-hot encoding would create 1000+ columns, which is not practical.

  • Apply frequency encoding to replace each category with its frequency.

    Why it's wrong here

    Frequency encoding still has 1000 unique values (the frequencies).

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 →

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.