Fraud Detection
Model performance

Model performance

XGBoost · 82 features · threshold 0.7032

PR-AUC (test)
0.9989
validation 0.9977
ROC-AUC (test)
1.0000
validation 1.0000
Recall (test)
0.9856
precision 0.9821
F1 (test)
0.9838
best F1 0.9893 @ 0.4700
Confusion at operational threshold
Counts of each outcome on the test set.
Outcome Count Meaning
True positives 274 Fraud correctly flagged
False positives 5 Legitimate flagged as fraud
False negatives 4 Fraud missed
True negatives 14717 Legitimate correctly cleared
Precision–Recall curve
Precision–Recall curve
On this imbalanced dataset, PR-AUC is the metric that matters. A random classifier would sit at ~1.7%.
ROC curve
ROC curve
For reference and comparison with published baselines.
Precision / Recall / F1 vs threshold
Precision / Recall / F1 vs threshold
Where to set the operational decision boundary.
Confusion matrix
Confusion matrix
At the model's operational threshold.
Score distribution
Score distribution
How well the model separates fraud from legitimate activity.
Feature importance (XGBoost gain)
Feature importance (XGBoost gain)
The signal the model leans on most.
Recall by segment
Recall by segment
Which fraud patterns the model catches best.
SHAP summary (beeswarm)
SHAP summary (beeswarm)
Global feature effect on fraud probability.
Mean |SHAP|
Mean |SHAP|
Magnitude-only view of feature influence.
Recall by segment
Which fraud patterns the model catches most reliably.
Segment Fraud cases Recall
Night (00–05) 88 0.9886
Day (09–16) 49 0.9796
Small amount 139 0.9712
Large amount 139 1.0000
New device 178 0.9888
Known device 100 0.9800
Out of province 162 0.9815
In home province 116 0.9914
International 82 0.9878
Domestic 196 0.9847
Channel: Mobile Banking 72 0.9722
Channel: Online Banking 103 0.9903
Channel: POS 79 1.0000
Channel: ATM 13 1.0000
Channel: Branch 11 0.9091