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 (3)
The constant-prevalence line is the part I keep coming back to. An ECE of 0.0046 beating Platt's 0.0048, with a ROC-AUC of 0.500 behind it, is the same kind of trap as an aggregate score that looks clean until you check what it rewards — a metric that can be won by saying the same thing about everyone. Pairing it with Brier and log loss, and showing the paired Brier difference (-0.0100, interval [-0.0116, -0.0085]) instead of just the ECE ranking, makes that visible.
Also appreciated the discipline around selection: Platt chosen on three earlier rolling windows by mean Brier and fixed before the final 118,108-row evaluation period was read, and the split naming — risk_score vs calibrated_fraud_probability, with the mapping explicitly not back-applied to the historical dashboard scores because it was fit for a different model.
One question: after splitting the two quantities, did the review-queue threshold end up set on the calibrated probability, or is the queue still sized by rank and capacity, with the calibrated value only used for interpretation?
Still by rank and capacity. The queue uses quantile risk bands on the risk score, so its size follows what a team can actually review, and the calibrated value is there to say what a band means. Platt is monotonic, so any cut on the calibrated probability is the same cut on the rank anyway. The real choice is the review budget and the cost of a miss against a wasted review, not which scale the threshold is written on. Calibration starts to matter for the cut itself once those costs are stated in probability terms, and that is the input this public dataset cannot give.
That answers it — and it makes the separation in your post do more work than I first read into it. If Platt is monotonic, writing the cut on the calibrated probability really is the same cut on the rank, so the queue itself is a capacity decision: quantile bands sized to what the team can review. The calibrated number is not steering the queue, it is translating what a band means.
What I take from your last point is that calibration only starts steering once the costs are stated in the same currency — a miss and a wasted review priced in probability terms — and that input is exactly what a public dataset cannot supply. So on public data the honest stopping point is "the band means roughly this rate", not a derived optimal threshold.
One follow-up: when review capacity itself moves — a smaller team one week, a backlog the next — do you redraw the quantile bands to the new capacity and let the implied probability cut float, or do you hold a probability floor and let the queue size float instead? That choice seems to be where the two scales would finally pull apart.