A card-fraud dataset was extracted on 30 June. A transaction's label is 1 if a chargeback had arrived by the extraction date, and chargebacks can arrive up to 90 days after the transaction. The chart shows the observed fraud rate by transaction month; fraud controls did not change. How should you treat the April–June transactions when you build the train and test sets?
Show the answer and explanation
Correct answer: D, Leave April to June out of both training and test until their 90-day window closes, because many of their frauds still carry label 0 and would mislead the model.
Explanation Data Splitting
This is a label maturity (outcome window) problem. A transaction's label is final only once its whole outcome window has passed. On 30 June, transactions made after 1 April have had less than 90 days for chargebacks to arrive, so some of their frauds are still recorded as legitimate. The falling bars for April (0.31%), May (0.17%) and June (0.04%) are an artefact of the data cut, not a real drop in fraud.
The rule: keep only rows whose outcome window had fully closed by the extraction date, for training and testing. Here that means transactions up to about the end of March; April–June rows join the next refresh once they have matured.
| Shortcut | Problem |
|---|---|
| Recent months as the test set | unlabelled frauds that the model flags count as false positives, so the metrics are distorted |
| Recent months in training only | the noise is not random: it is one-sided and concentrated in recent rows, so the model learns that recent-looking patterns are safe |
| Upweighting the known recent frauds | the missing frauds still carry label 0, and early-reported frauds are not representative, so reweighting cannot recover them |
The same issue appears with 12-month default flags in credit, late-reported insurance claims, and churn defined as 30 days of inactivity. If recent data is essential, survival-style models or a shorter proxy label that has already matured are alternatives.
Interview tip: state the outcome window when defining the target ("chargeback within 90 days of the transaction") and set the last usable transaction date to the extraction date minus that window. A common follow-up is how to monitor such a model when labels arrive 90 days late (proxy metrics and input drift).