Applied Machine Learning · Classification + Risk

An applied machine learning case study focused on fraud detection, imbalanced classification, feature preparation, model comparison, and evaluation in a high-risk financial context.

📦 Repository Structure

This project is maintained within the broader DataInsideData technical portfolio monorepo.

The project implementation, notebooks, charts, and supporting documentation live in:

applied-data-science-machine-learning/ml-fraud-detection/

within: DataEden / fari-tech-portfolio

The project documents an applied fraud-detection workflow built around exploratory analysis, preprocessing, imbalanced classification, model comparison, and evaluation.

🏗️ Documentation Architecture

The technical documentation presented later on this page is dynamically rendered from the project's repository README.

The repository remains the single source of truth for project documentation while DataInsideData.com provides the presentation layer for structured browsing, technical explanation, and portfolio storytelling.

This model keeps notebooks, analytical outputs, implementation details, and public-facing documentation aligned as the project evolves.

Machine Learning Workflow

How the Fraud Detection Analysis Works

The project moves from simulated transaction data through exploratory analysis, feature preparation, imbalanced classification, model comparison, and evaluation using metrics better suited to rare-event detection.

💳 Data Foundation

Transaction-Level Inputs

The project uses a large simulated financial transaction dataset designed for fraud-detection analysis.

  • Transaction type
  • Transaction amount
  • Origin account balances
  • Destination account balances
  • IsFlaggedFraud indicator
  • IsFraud target label

These fields provide the basis for exploratory analysis, feature preparation, classification experiments, and fraud-pattern investigation.

🧹 Feature Preparation

Modeling-Ready Data

Raw transactional fields are explored and transformed before model training so the dataset can support reproducible classification experiments.

The workflow includes preprocessing, feature preparation, inspection of fraud patterns, and consideration of the severe class imbalance between legitimate and fraudulent transactions.

🤖 Modeling

Imbalanced Classification

Classification models are trained and compared under conditions where fraudulent observations represent only a small portion of the complete transaction dataset.

The project includes comparison of modeling approaches with and without SMOTE to study how imbalance-handling strategies affect fraud-detection behavior.

📈 Evaluation

Beyond Accuracy

Because fraud is a rare-event classification problem, overall accuracy can hide poor detection performance.

Evaluation therefore emphasizes:

  • Precision
  • Recall
  • Sensitivity
  • Confusion-matrix behavior
  • With-SMOTE vs. without-SMOTE comparison

Modeling Insight

Fraud Detection as a Business-Sensitive Classification Problem

The project treats model evaluation as more than a search for the highest headline accuracy score.

🧠 Why Accuracy Is Not Enough

Fraudulent transactions are rare relative to legitimate activity. A model can therefore achieve high overall accuracy while still failing to identify the events that matter most.

The analysis emphasizes precision, recall, sensitivity, confusion-matrix behavior, and imbalance-aware model comparison to better evaluate practical fraud-detection usefulness.

This frames fraud detection as a business-sensitive classification problem in which the cost of missed fraud and incorrect fraud flags must be considered alongside model performance.

Visual Evaluation

Exploratory and Model Diagnostics

The project uses visual analysis to support both exploratory investigation and interpretation of model behavior.

📊 Visual Analytics

Project outputs include visual comparisons such as:

  • Naïve fraud flag vs. actual fraud
  • Transaction-type distribution by fraud status
  • Transaction amount by type
  • Final model confusion matrix
  • Model comparison with and without SMOTE

These visuals provide a clearer connection between transaction patterns, classification performance, and the practical behavior of the resulting models.

Project Source

Repository Documentation

Explore the notebooks, charts, repository assets, and README-backed technical documentation supporting the fraud-detection case study.

ML Fraud Detection

An applied machine learning case study focused on fraud detection, imbalanced classification, preprocessing, model comparison, and evaluation in a high-risk financial context.

Loading project documentation...

Updated: