Should you scale binary or one-hot encoded features alongside continuous features?

Quick Overview

Asks whether binary and one-hot encoded features should be scaled together with continuous features. Tests understanding of standardization, interpretability and sparsity, regularization strength, distance-based models, and per-column preprocessing in practice.

Should you scale binary or one-hot encoded features alongside continuous features?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

Should you scale binary or one-hot encoded features alongside continuous features? ```hint Rare categories Work out what standardization does to a 0/1 column whose 1s are rare, then ask which models would notice the difference. ``` ### What a Strong Answer Covers - A default recommendation and what it depends on - What standardizing a rare binary column does to its values - The effect on interpretability, sparsity and regularization - How the answer changes by model family (trees, penalized linear models, distance-based methods, neural networks) - A practical way to preprocess different column types differently ### Follow-up Questions - In L2-regularized logistic regression, how does standardizing a rare binary feature change how strongly its effect is shrunk? - In k-means on mixed data, how would you decide how much a category mismatch should count against continuous differences? - Why is centering a sparse one-hot matrix a memory problem, and how can you scale without centering?

Overview: Asks whether binary and one-hot encoded features should be scaled together with continuous features. Tests understanding of standardization, interpretability and sparsity, regularization strength, distance-based models, and per-column preprocessing in practice.

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

Should you scale binary or one-hot encoded features alongside continuous features?

What a Strong Answer Covers Guidance

  • A default recommendation and what it depends on
  • What standardizing a rare binary column does to its values
  • The effect on interpretability, sparsity and regularization
  • How the answer changes by model family (trees, penalized linear models, distance-based methods, neural networks)
  • A practical way to preprocess different column types differently

Follow-up Questions Guidance

  • In L2-regularized logistic regression, how does standardizing a rare binary feature change how strongly its effect is shrunk?
  • In k-means on mixed data, how would you decide how much a category mismatch should count against continuous differences?
  • Why is centering a sparse one-hot matrix a memory problem, and how can you scale without centering?