Fraud-score explorer
Score a real credit-card transaction and see the decision and its five strongest reasons.
How it works
The function rebuilds the model's 79 inputs from the transaction you send and the 10 transactions before it, exactly as the training pipeline did. A test checks that it gives the same probability as the original pipeline on 1,000 held-out rows.
The LightGBM model returns a margin. The probability is the sigmoid of that margin plus the training init score, then the project's Platt calibration; the decision compares the calibrated value with the tuned threshold. The five reasons are the model's own feature contributions, in log-odds units.
The model time is the in-process inference alone; the round trip includes the network. Nothing you enter is stored.
Model card
- Data
- ULB credit-card transactions (284,807 rows, 0.17% fraud), PCA-anonymised, CC BY-NC-SA 4.0
- Split
- Chronological train, validation and holdout splits
- Measured
- F1, precision, recall and ROC-AUC on the time-ordered holdout
- Limits
- A 2013 European dataset; not representative of Kenyan card traffic.
- Scores need the previous ten transactions, so samples come with their history.