Courseiva
Exploratory Data AnalysishardMultiple SelectObjective-mapped

MLS-C01 Exploratory Data Analysis Practice Question

A data scientist is evaluating feature engineering options for a dataset containing a categorical variable 'education_level' with values: High School, Bachelor, Master, PhD. The target variable is continuous. Which THREE encoding methods are appropriate for this ordinal categorical variable? (Choose 3)

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

One-hot encoding

Options A, B, and D are correct: One-hot encoding (A) can be used for ordinal variables, though it ignores order, it is still valid. Target encoding (B) captures the relationship with the target and respects ordinality. Label encoding (D) preserves the ordinal nature. Option C (hash encoding) is incorrect because it is typically used for high-cardinality nominal variables, not ordinal, and may lose interpretability. Option E (binary encoding) is also incorrect because it is designed for nominal categories and does not maintain order.

Answer analysis

Option-by-option breakdown

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

  • One-hot encoding

    Why this is correct

    One-hot encoding is a safe option that does not assume any order, though it increases dimensionality.

  • Target encoding (mean of target per category)

    Why this is correct

    Target encoding can capture the effect of each category on the target.

  • Hash encoding (using feature hashing)

    Why it's wrong here

    Hash encoding is for high cardinality nominal variables and loses ordinal information.

  • Label encoding (e.g., High School=0, Bachelor=1, Master=2, PhD=3)

    Why this is correct

    Label encoding preserves the ordinal relationship.

  • Binary encoding (convert to binary representation)

    Why it's wrong here

    Binary encoding is for nominal variables and does not preserve ordinality.

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.