๐ Machine Learning ยท Financial Analytics ยท Python
Transaction Anomaly Detector
Unsupervised anomaly detection pipeline on a financial transaction dataset using Isolation Forest โ flagging outliers before they reach any downstream report, with a false-positive comparison against a threshold-based baseline.
โ FP
vs threshold baseline
The Problem
Financial transaction data is noisy. Unusual amounts, odd timing patterns, and unfamiliar counterparty combinations can signal errors, exceptions, or fraud โ but they look like normal variation until someone digs in manually.
Threshold-based rules catch the obvious outliers, but they miss the subtle ones and flag too many false positives to be useful. The goal was a smarter approach that could learn what "normal" looks like from the data itself.
The Goal
Build an unsupervised anomaly detection pipeline that flags unusual transactions โ before they reach any report โ with fewer false positives than a simple threshold rule, and a clear options doc for tuning the sensitivity trade-off.
My Role
Built the full pipeline end to end โ SQL extraction, feature engineering on the transaction data, Isolation Forest model training and scoring, false-positive comparison against a threshold-based baseline, and an options document laying out the sensitivity trade-offs for whoever would tune it in production.
Tools & What I Used Them For
Outcomes
๐
Isolation Forest outperformed the threshold baseline. Fewer false positives while catching the same set of genuine outliers โ particularly on subtle timing and counterparty patterns the threshold rule missed.
๐
Options doc for production tuning. Documented the contamination parameter sensitivity, the false-positive / recall trade-off at different thresholds, and recommendations for each use case โ fraud review vs. reconciliation exception flagging.
๐
Pipeline is reusable. Built as modular Python โ the extraction, feature engineering, and scoring steps are separated so the model can be retrained or plugged into a different data source with minimal rework.