Courseiva
Data for AImediumMultiple ChoiceObjective-mapped

AI Associate Data for AI Practice Question

During data transformation, a data scientist applies one-hot encoding to a categorical feature with 50 unique values. The resulting dataset has 50 new columns. What is a potential drawback of this transformation?

⚠ Common exam trap

Salesforce often tests the misconception that one-hot encoding always improves model performance by preserving all information, when in fact high cardinality introduces sparsity and overfitting risks that can degrade model 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

High cardinality leading to sparse data and overfitting

One-hot encoding a categorical feature with 50 unique values creates 50 binary columns, each representing one category. This high cardinality leads to a very sparse matrix (most entries are 0), which can cause the model to overfit by learning noise from rare categories, especially when the dataset is not large enough to support such dimensionality.

Answer analysis

Option-by-option breakdown

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

  • Reduction in training time

    Why it's wrong here

    More features increase training time.

  • Increased interpretability of the model

    Why it's wrong here

    One-hot can make models less interpretable with many columns.

  • High cardinality leading to sparse data and overfitting

    Why this is correct

    High cardinality creates many sparse columns, risking overfitting.

  • Loss of ordinal information in categories

    Why it's wrong here

    Ordinal info is lost, but that's not the main drawback here.

About these practice questions

One of 753 original AI Associate 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AI Associate practice question is part of Courseiva's free Salesforce 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 AI Associate exam.