Skip to content
← All work

Credit Card Fraud Detection

Classifying fraudulent transactions with tree-based models.

  • Python
  • Random Forest
  • Decision Tree
Credit Card Fraud Detection cover artwork

Problem

Fraudulent transactions are rare, so naive models look accurate while missing most fraud.

My role

Solo.

Solution

Trained and compared Random Forest and Decision Tree classifiers on transaction data.

Architecture

DatasetPreprocessingTrain / test splitRF · DT modelsEvaluation

Tech stack

Python · Random Forest · Decision Tree

Challenges

Class imbalance
Fraud cases are a tiny fraction, so the data was balanced before training.
Choosing the right metric
Looked beyond accuracy to precision and recall on the fraud class.

Results & learnings

Why accuracy misleads on imbalanced data, and how tree ensembles compare to a single tree.

Next project

PWM Generator →