Bucketize Continuous Signals for a Linear Ads Click Model

Last updated: November 29, 2026

Quick Overview

A logistic regression model for Google Ads click prediction uses ad position, user age of account, and query length as numeric inputs. Explain why bucketizing these continuous features helps a linear model and how you would choose the bucket boundaries.

Google
Machine Learning
Software Engineer
Google
November 29, 2026
Software Engineer
Phone Screen
Machine Learning
Easy

0

0

0 solved


A logistic regression model for Google Ads click prediction uses ad position, user age of account, and query length as numeric inputs. Explain why bucketizing these continuous features helps a linear model and how you would choose the bucket boundaries.

Large linear models remain common in ads at Google because they are fast and easy to update. The interviewer checks that you understand what a linear model can and cannot represent and how discretization gives it non-linear capacity.

What the Interviewer Expects
  • Explains that a raw numeric feature can only have a monotone linear effect on the logit
  • Shows how one-hot buckets let each range have its own weight
  • Compares equal-width and quantile boundaries
  • Discusses the trade-off between bucket count and data per bucket
  • Mentions crossing buckets with other features
Key Topics to Cover
bucketization
discretization
linear models
quantile boundaries
non-linear effects
How to Approach This
  1. Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
  2. Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
  3. Feature engineering is often more impactful than model selection.
  4. Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
  5. Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
  • How many buckets would you use for a feature with 10 million training examples?
  • What happens to values outside the training range at serving time?
  • Would you bucketize features for a gradient boosted tree?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Explore ML Interview Prep
Sample Answer
Clarify

Ask how each feature relates to clicks. Click rate falls steeply from position 1 to 3 and then flattens, account age matters mainly in the first weeks, and query length may have a peak in the middle. ...

Approach

In logistic regression, a raw feature contributes w⋅xw \cdot x to the logit, so its effect is forced to be a straight line. If click rate rises then falls with query length, no single weight fits. Buck...


Submit Your Answer
Markdown supported