Why are ratio features often more effective in linear models than the raw numerator and denominator?

Quick Overview

This machine learning question asks why a linear model often does better with a ratio feature, such as debt to income, than with the raw numerator and denominator as separate inputs. It tests what additive models can represent, scale normalization, collinearity, and how to handle zero or tiny denominators.

Why are ratio features often more effective in linear models than the raw numerator and denominator?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Why are ratio features (for example debt divided by income, or clicks divided by views) often more effective in a linear model than giving the model the raw numerator and denominator as two separate features? ```hint Write out the score Write the score a linear model computes from the two raw inputs. Then compare two entities with the same ratio where one is ten times the size of the other. ``` ```hint Look at the inputs together Think about how the numerator and denominator move together across entities of different sizes, and what that does to the fitted coefficients. ``` ### What a Strong Answer Covers - Why a weighted sum of the raw inputs cannot express a division, shown with a concrete example - How a ratio normalizes for entity size and can make the relationship to the target closer to linear - The effect of a correlated numerator and denominator on coefficient stability and interpretability - Practical caveats: zero or tiny denominators, noisy small counts, heavy tails, and when to keep the raw parts ### Follow-up Questions - If you log-transform the numerator and denominator, can a linear model recover the ratio? What does that require? - How would you handle a ratio feature when many denominators are zero or very small? - Would a gradient-boosted tree model benefit from the same ratio feature? Why or why not? - When should you keep the raw numerator and denominator alongside the ratio?

Overview: This machine learning question asks why a linear model often does better with a ratio feature, such as debt to income, than with the raw numerator and denominator as separate inputs. It tests what additive models can represent, scale normalization, collinearity, and how to handle zero or tiny denominators.

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

Why are ratio features (for example debt divided by income, or clicks divided by views) often more effective in a linear model than giving the model the raw numerator and denominator as two separate features?

What a Strong Answer Covers Guidance

  • Why a weighted sum of the raw inputs cannot express a division, shown with a concrete example
  • How a ratio normalizes for entity size and can make the relationship to the target closer to linear
  • The effect of a correlated numerator and denominator on coefficient stability and interpretability
  • Practical caveats: zero or tiny denominators, noisy small counts, heavy tails, and when to keep the raw parts

Follow-up Questions Guidance

  • If you log-transform the numerator and denominator, can a linear model recover the ratio? What does that require?
  • How would you handle a ratio feature when many denominators are zero or very small?
  • Would a gradient-boosted tree model benefit from the same ratio feature? Why or why not?
  • When should you keep the raw numerator and denominator alongside the ratio?