Passage: In a retail dataset, customers are observed over months after first purchase. A common approach is to label each customer as “churned” if they have no purchases in the next 60 days, then train a model using features derived from their past behavior. However, some team members accidentally compute summary statistics (like average order value) using transactions that occur after the 60-day prediction window. They notice performance increases but suspect it may not generalize. They also vary class balance by oversampling churn cases. Your task is to design feature engineering and evaluation so that future information cannot influence training, and so that apparent gains reflect real predictive signal rather than artifacts. A robust workflow must use time-aware splits and define features aligned to the prediction horizon.

Answer

Use a metric that is threshold-independent (e.g., ROC-AUC) when oversampling changes prevalence, Evaluate using a time-based holdout and metrics appropriate to imbalanced data, possibly with precision-recall curves

Explanation

Oversampling alters class prevalence, so threshold-dependent metrics like accuracy can shift; ROC-AUC is less sensitive to prevalence. A time-based holdout and imbalance-aware metrics (e.g., PR curves) help confirm generalization beyond artifacts.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error
QuestionBack to list