KatInterview

Predict Which Free-Tier Merchants Will Upgrade to a Paid Plan

Machine LearningModel answer
HardModel answerMachine Learningsupervised-learningfeature-engineeringtime-series-leakage

Last updated

Design a production-ready ML pipeline to identify free-tier merchants likely to convert to a paid subscription within 60 days, covering labeling, leakage, features, modeling, evaluation, and monitoring.

Paid Plan Conversion Prediction

A payments platform offers a free tier and a paid subscription tier. The business team wants a scored list of free-tier merchants most likely to upgrade to the paid plan within the next 60 days, so account managers can reach out proactively. You have access to transaction history and merchant metadata up to 2025-07-03, and the target outcome window ends 2025-09-01.

Design a production-ready classification system. Address each part below concisely but precisely.

What to cover

(a) Labeling Define exactly who is eligible for scoring, what counts as a positive, what counts as a negative, and what the observation and outcome windows are. Explain how you handle merchants already on the paid tier and newly created merchants with little history ("cold-start").

(b) Leakage Identify at least five concrete data-leakage risks specific to this problem — not generic ones — and describe how each would be prevented through time-gated feature windows, as-of snapshots, or proper train/validation splits.

(c) Features Propose 15–25 high-signal features computable from transaction history and merchant metadata. Cover recency/frequency/monetary signals, recurring-billing behavioral patterns, customer concentration, payment-method diversity, timing signals, risk indicators, growth rates, and metadata such as account age, vertical, and geography.

(d) Modeling Select two model families and justify the choice. Discuss how to handle severe class imbalance. Describe your calibration strategy and how you would present model output to a non-technical sales team.

(e) Evaluation Specify how you structure time-based cross-validation. Name your primary metrics and explain how you would pick a decision threshold to deliver a ranked list of 1,000 merchants with expected precision ≥ 0.60.

(f) Monitoring Define what you would track after deployment — feature distribution drift, label drift, calibration drift — and explain how you would trigger retraining without letting future labels contaminate the next training run.

Hints

Hint 1

Anchor every feature window strictly to the observation cutoff date. If any computation touches data after that date — even indirectly through a joined table — it is leakage.

Hint 2

Optimizing for PR-AUC during training is not the same as selecting a threshold for deployment. Calibrated probabilities let you pick a threshold by reading precision directly from the precision-recall curve at rank 1,000.

Hint 3

Merchants already on the paid tier are neither positives nor negatives — they belong to a completely different problem. Silently including them as negatives will distort both training and evaluation.