A churn model scores an AUC of 0.99 and the team wants to put it in front of customer success. The features peek at the future and at the label, the split puts the same customer in train and test, and the metric is computed on training data. Make the evaluation honest.
This is the practice version. Assessments always use a variant you have never seen.
Customer success wants a weekly list of accounts likely to churn next month. churn/pipeline.py builds one row per customer per monthly snapshot, trains a small
logistic regression and reports AUC. The label is "churned within 30 days after the snapshot".
build_features may only use what was known on the snapshot date: no label-derived features, no
events on or after the snapshot, 30-day windows are snapshot − 30 ≤ day < snapshot, recency is measured
from the snapshot.train_test_split must keep every customer entirely in train or in test, and assignment must not change
when rows are reordered.run fits the scaler on training rows only and reports metrics on the test rows; auc counts ties
as half.Keep FEATURE_NAMES, build_features, train_test_split, auc and run working. Stdlib only.
| Specify Bearing Fits and a Tolerance Stack-Up on a Gearbox Shaft DrawingCAD & engineeringTiers: Mid-levelEditorial | Hard | File deliverable | 45 min | Calibrating |
| Clean Up a Hard-Coded Sales Quote CalculatorFinance & analyticsTiers: FresherEditorial | Easy | File deliverable | 30 min | Calibrating |
| Close the Holes in a Notes API Before the Pen TestSecurityTiers: JuniorEditorial | Medium | Code repo | 45 min | Calibrating |