This was basically six questions wrapped in one and I did not realize how deep it went until I was already three sub-parts in.
Start by clarifying the business objective and success metrics, then walk through the ML lifecycle: labeling, feature engineering with strict leakage prevention, model selection, evaluation, and monitoring. Emphasize production readiness by discussing data pipelines, retraining, and how to handle class imbalance and temporal drift.
Pro tip: Use a time-based split for validation and test sets to mimic real deployment, and consider using survival analysis or a sliding window approach to handle the 60-day horizon and censoring. Also, align the model's output with business actions (e.g., targeted outreach) to demonstrate impact.
Clarify the prediction goal: identify non-subscription merchants likely to adopt Subscriptions within 60 days. Define the label as whether a merchant adopts within 60 days of a reference date, and handle censoring by excluding merchants with insufficient observation time or using survival analysis.
Engineer features from merchant attributes, transaction history, product usage, and engagement metrics. Prevent leakage by ensuring all features are computed using only data available before the prediction date, and avoid using future information or target-derived features.
Choose models robust to class imbalance and temporal effects, such as gradient boosted trees (XGBoost, LightGBM) or logistic regression with regularization. Use time-based cross-validation and consider survival models if censoring is significant.
Evaluate using metrics like AUC-ROC, precision-recall AUC, and lift at top-k. Select an operating threshold based on business costs (e.g., cost of outreach vs. conversion value) and validate on a holdout set from a later time period.
Deploy the model with a pipeline for batch or real-time scoring. Monitor input drift, output drift, and performance metrics (e.g., precision@k) over time. Set up alerts for degradation and plan for periodic retraining with new data.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.