Fraud Detection
Overview
Machine learning · XGBoost · 100K transactions

Detect fraudulent transactions in real time.

A production-shaped fraud detection system trained on a synthetic banking dataset of 100,000 transactions across 5,000 clients. It combines temporal, velocity, geographic, device-novelty and behavioural features to score each transaction and explain the reasoning behind the decision.

PR-AUC (test)
0.9989
vs 0.9977 on validation
ROC-AUC
1.0000
Clean separation of classes
Precision
0.9821
of flagged transactions are truly fraud
Recall
0.9856
of fraud transactions are caught
What this does
An end-to-end fraud detection pipeline, not a notebook demo.

Each transaction flows through a feature engineering step that produces 82 predictors — including how fast the client is transacting, whether the amount is unusual for them, whether they have ever used this device, and whether the transaction location matches their home province.

The model outputs a fraud probability. If it crosses the operational threshold (0.7032), the transaction is flagged. Every flagged transaction also gets a SHAP-based explanation showing which features pushed the score up and which pulled it down.

  • Raw data: 100,000 transactions, 5,000 clients, 1.7% fraud.
  • Feature engineering: 82 predictors, all temporally leak-free.
  • Models compared: Logistic Regression baseline vs XGBoost.
  • Chosen model: XGBoost, threshold 0.7032.