Credit Card Fraud Detection
Deep-learning fraud detector reaching 94.29% precision on highly imbalanced data, with NLP-encoded metadata and LIME explainability.
MLDA EEE Datathon
- AI / ML
Problem
Fraud is rare, so the data is heavily skewed and a model can look accurate while missing almost every fraudulent transaction. Built for the MLDA EEE Datathon on Kelvin Kelue’s Credit Card Fraud Prediction dataset, this project catches fraud on that imbalance — and keeps every decision explainable.
Approach
- Split the data 2:1 (train:test) and used a correlation matrix to study the numerical features.
- Numerical features run through a Random Forest with balanced class weights and thresholds tuned to minimise false negatives, with hyperparameters found via randomized search.
- Categorical metadata is encoded with NLP rather than one-hot — it generalises to rare or unseen categories and captures semantic relationships — then vectorized and compared through a cosine-similarity matrix.
- A deep neural network fuses the signal: three hidden layers (64 → 128 → 256) with ReLU and dropout, and a sigmoid output giving a fraud probability.
- LIME explains each prediction, so a flag comes with a reason rather than a black-box verdict.
Results
94.29%
Precision (fraud class)
3
DNN hidden layers
Key decisions
Missing fraud costs more than a false alarm, so balanced class weights and tuned thresholds drive down false negatives specifically. NLP encoding is chosen over one-hot to survive rare categories, and LIME is layered on because a fraud model no one trusts never gets deployed.