Skip to content

Akshat8510/Fraud-Detection-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ Online Transaction Fraud Detection

Python Scikit-Learn XGBoost

πŸ“Œ Project Overview

This project identifies fraudulent activity in financial transactions using a dataset of 6.3M+ records. The core challenge is the extreme class imbalance (only 0.13% are fraud). I implemented a multi-iteration approach using SMOTE and XGBoost to reach near-optimal detection levels.

πŸ“Š Key Results

Through 5 iterations of data engineering and balancing, the models achieved the following performance:

Iteration Strategy XGBoost AUC Random Forest AUC
1 Baseline (Default Params) 87% 86%
2 Hyperparameter Tuning 99.5% 84.3%
3 SMOTE + Tuning 99.4% 98.7%
4 Undersampling + Tuning 98.8% 99.6%
5 SMOTE + Subsampling 99.0% 92.1%

πŸ› οΈ Feature Importance

The analysis revealed that the most influential features for detecting fraud are:

  1. oldbalanceOrg (Balance before transaction)
  2. newbalanceDest (Recipient's new balance)
  3. amount (Size of the transaction)

πŸ“‚ Project Structure

β”œβ”€β”€ Fraud_detection.ipynb  # Main analysis and model training
β”œβ”€β”€ requirements.txt       # Dependencies
β”œβ”€β”€ .gitignore             # Excludes large data files
└── README.md              # Project documentation

πŸš€ How to Run

  1. Clone the repo:
    git clone https://github.com/Akshat8510/Fraud-Detection-Project.git
  2. Install dependencies:
    pip install -r requirements.txt
  3. Run the Jupyter Notebook Fraud_detection.ipynb.

About

This project focuses on detecting fraudulent transactions using machine learning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published