My IEEE-CIS fraud dashboard had a column called predicted_fraud_probability. It came from a LightGBM model with a ROC-AUC of 0.9134 on a time-ordered holdout, so it ranked transactions well. But nothing in the pipeline had ever checked whether a score of 0.30 meant that roughly 30% of those transactions were fraud. It was a ranking score with a probability's name.
So I fit a separate, versioned model and calibrated it properly.
Setup
- A new LightGBM fit with 500 trees and 425 final predictors. It is not the dashboard model, so its numbers are not compared with the 0.9134 above.
- Three strictly separated time periods: core 354,324 rows for training, calibration 118,108 rows for fitting the mapping, evaluation 118,108 rows with 4,064 fraud labels. Timestamp groups stay intact across the cuts.
- The calibration method was chosen on three earlier rolling windows by mean Brier score. Platt scaling won there, and it was fixed before the final evaluation period was read.
Results on the evaluation period
| Method | ROC-AUC | Avg. precision | Brier | Log loss | ECE |
|---|---|---|---|---|---|
| Raw ranking score | 0.8775 | 0.4836 | 0.0632 | 0.2346 | 0.1448 |
| Platt (selected) | 0.8775 | 0.4836 | 0.0233 | 0.0985 | 0.0048 |
| Isotonic (descriptive) | 0.8769 | 0.4697 | 0.0235 | 0.0991 | 0.0066 |
| Constant prevalence | 0.5000 | 0.0344 | 0.0332 | 0.1500 | 0.0046 |
Three things in that table are worth slowing down for.
The ranking did not move. Platt scaling is a monotonic mapping, so ROC-AUC and average precision are identical before and after. Calibration changes what a score means, not which transaction comes first in the review queue.
The raw score was far off. An expected calibration error of 0.145 means that, averaged over score bins, the scores sat about 14.5 percentage points away from the fraud rate actually observed in each bin. Anyone reading 0.30 as "30% likely" would have been misled.
The constant baseline has the lowest ECE. Predicting the prior fraud rate for every transaction gives an ECE of 0.0046, slightly better than Platt, and a ROC-AUC of 0.500. Calibration error alone rewards a model that says the same thing about everyone. Brier score and log loss separate the two: Platt beats the constant on both. The paired Brier difference is -0.0100, with an approximate 95% interval of [-0.0116, -0.0085] from a day-block bootstrap (42 blocks, 1,000 resamples). That interval is conditional on the fitted model and does not include model-fit uncertainty.
Isotonic regression was close but was never the selected method. It is in the table for comparison only.
What changed in the product
The research page now defines two separate quantities: risk_score for ranking and calibrated_fraud_probability for the calibrated version. The mapping is never applied to the historical dashboard scores, because it was fit for a different model.
Boundaries
IEEE-CIS features are masked, and TransactionDT is relative elapsed time rather than a calendar date. The full dataset had been explored in earlier research, so this is a careful retrospective study, not a fresh confirmation. There is no live scoring API and no automatic payment decision anywhere in the project.
What I keep from it
- A good ROC-AUC says the order is right. It says nothing about whether the numbers can be read as probabilities.
- Check calibration with a metric that also punishes a model for not discriminating. ECE alone can be won by a constant.
- Choose the calibration method on earlier windows, then read the final period once.
Links
- Code and validation records: github.com/senanurcetin/ieee-fraud-detection-analytics
- Executed notebook: IEEE-CIS LightGBM500 temporal calibration (Kaggle)
- Research page: fraud-project-web.vercel.app/research
Top comments (0)