How would you build and validate a logistic regression model to predict customer churn?

Quick Overview

Asks how to frame customer churn as a classification problem, fit a logistic regression model and validate it before use. Tests label and window design, leakage, time-based validation, metrics for rare outcomes, calibration and choosing a threshold from retention costs.

How would you build and validate a logistic regression model to predict customer churn?

Role: Data Scientist

Category: Machine Learning

Difficulty: medium

Interview Round: Other

How would you use logistic regression for a classification task such as predicting churn, and what conceptual steps are involved in validating such a model? ```hint Timing of features For each feature, ask when it would be known relative to the moment the prediction is made, and make sure the validation split respects that order. ``` ```hint What the score drives The model's output decides which customers get a retention action. Pick metrics and a threshold that match that decision. ``` ### Clarifying Questions to Ask - How is churn defined here: a cancelled subscription, or no activity for some number of days? - How far ahead should the model predict, and how often will customers be scored? - What happens to a customer the model flags, and what does that action cost? - Roughly what share of customers churn in a typical period? ### What a Strong Answer Covers - The churn label, the observation and prediction windows, and features built only from data available at prediction time. - How the model is fitted and interpreted, including encoding, regularization and class imbalance. - A validation design that matches how the model will be used, such as a time-based split. - Metrics suited to a rare positive class, calibration, and a threshold tied to retention costs. - Monitoring and retraining after launch. ### Follow-up Questions - A single feature has a huge coefficient and validation ROC-AUC is 0.98. What would you check? - Some flagged customers would have stayed without the retention offer. How would you change the targeting? - How would you explain an odds ratio of 1.5 for "support tickets in the last 30 days" to a business partner? - When would you move from logistic regression to gradient-boosted trees?

Overview: Asks how to frame customer churn as a classification problem, fit a logistic regression model and validate it before use. Tests label and window design, leakage, time-based validation, metrics for rare outcomes, calibration and choosing a threshold from retention costs.

Nov 25, 2026
mediumData ScientistOtherMachine Learning
0
0

How would you use logistic regression for a classification task such as predicting churn, and what conceptual steps are involved in validating such a model?

Clarifying Questions to Ask Guidance

  • How is churn defined here: a cancelled subscription, or no activity for some number of days?
  • How far ahead should the model predict, and how often will customers be scored?
  • What happens to a customer the model flags, and what does that action cost?
  • Roughly what share of customers churn in a typical period?

What a Strong Answer Covers Guidance

  • The churn label, the observation and prediction windows, and features built only from data available at prediction time.
  • How the model is fitted and interpreted, including encoding, regularization and class imbalance.
  • A validation design that matches how the model will be used, such as a time-based split.
  • Metrics suited to a rare positive class, calibration, and a threshold tied to retention costs.
  • Monitoring and retraining after launch.

Follow-up Questions Guidance

  • A single feature has a huge coefficient and validation ROC-AUC is 0.98. What would you check?
  • Some flagged customers would have stayed without the retention offer. How would you change the targeting?
  • How would you explain an odds ratio of 1.5 for "support tickets in the last 30 days" to a business partner?
  • When would you move from logistic regression to gradient-boosted trees?