Which supervised model families require explicit encoding of categorical inputs?

Quick Overview

Asks which families of supervised models need categorical features converted to numbers before training, and which can take them directly. Tests your understanding of one-hot and ordinal encoding, embeddings, native categorical support in tree libraries and high-cardinality features.

Which supervised model families require explicit encoding of categorical inputs?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

Which supervised model families require explicit encoding of categorical inputs? ```hint What the model computes For each family, ask whether training adds, multiplies or measures distances on the input values, or only compares and counts them. ``` ### What a Strong Answer Covers - Which families need categories turned into numbers, and why. - Why integer label codes mislead models that do arithmetic on their inputs. - Which tree and Naive Bayes implementations handle categories natively, and which do not. - Options for high-cardinality features, and how to avoid leakage with target encoding. ### Follow-up Questions - How would you handle a category at serving time that never appeared in training? - When is ordinal encoding acceptable, and when does it hurt? - How does CatBoost's ordered target statistics keep a row's own label out of its encoding? - For a feature with K levels in a linear model with an intercept, how many dummy columns would you create, and does regularization change that?

Overview: Asks which families of supervised models need categorical features converted to numbers before training, and which can take them directly. Tests your understanding of one-hot and ordinal encoding, embeddings, native categorical support in tree libraries and high-cardinality features.

General logo
General
Nov 24, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

Which supervised model families require explicit encoding of categorical inputs?

What a Strong Answer Covers Guidance

  • Which families need categories turned into numbers, and why.
  • Why integer label codes mislead models that do arithmetic on their inputs.
  • Which tree and Naive Bayes implementations handle categories natively, and which do not.
  • Options for high-cardinality features, and how to avoid leakage with target encoding.

Follow-up Questions Guidance

  • How would you handle a category at serving time that never appeared in training?
  • When is ordinal encoding acceptable, and when does it hurt?
  • How does CatBoost's ordered target statistics keep a row's own label out of its encoding?
  • For a feature with K levels in a linear model with an intercept, how many dummy columns would you create, and does regularization change that?