KatInterview

Designing a Churn Risk System: Classification vs. Survival

Machine LearningModel answer
MediumModel answerMachine Learningchurn-predictionsurvival-analysisclass-imbalance

Last updated

Design an end-to-end churn prediction system for a subscription business, choosing between windowed binary classifiers and time-to-event models, avoiding leakage, and turning scores into daily actions.

Context

You are a data scientist at a subscription software company. The customer success (CS) team has limited outreach capacity and wants a daily ranked list of accounts most likely to cancel, plus guidance on the drivers behind each score. The available longitudinal table includes, per customer: monthly_billing_amount, support_ticket_volume, days_since_last_login, subscription_start_date, and a binary churn_status flag.

What to deliver

  1. Framing the task. Compare a binary classifier (e.g., logistic regression, random forest) that predicts "churn within the next H days" against a survival model (Kaplan–Meier, Cox proportional hazards). Discuss data handling and business usefulness for each.
  2. Features and leakage. Name realistic leakage traps in this dataset and explain how features and labels must be computed relative to a snapshot date. Address how customers who haven't churned yet are handled during training.
  3. Evaluation. Given monthly churn of roughly 2–5%, say which metrics you would trust for the classifier and how you would evaluate a survival model such as Cox (e.g., C-index), and why.
  4. Deployment. Describe how to turn probabilities or risk scores into a concrete daily worklist for CS, including prioritization logic and how you would validate business impact.

Constraints

  • The data is longitudinal (multiple observations per customer over time).
  • New customers lack history; long-tenured customers behave differently — account for both.
  • Discuss the tension between interpretability (coefficients, hazard ratios) and predictive power.

Hints

Hint 1

Frame churn as a time-to-event with censoring, not just a yes/no label — note how a windowed classifier discards customers without full follow-up.

Hint 2

Every feature must be computed as of a snapshot date using only data before it; lifetime aggregates and post-cancellation signals are classic leaks.

Hint 3

With 2–5% positives, accuracy is useless — anchor evaluation on precision@k where k equals the CS team's daily capacity.

Hint 4

Convert any score (Cox survival curve or calibrated probability) into the same 30-day churn probability so models and actions are comparable.