Skip to content

Predicting transaction fraud using classification problems such as Guardian Boosting as well as user interfaces using Streamlite

License

Notifications You must be signed in to change notification settings

sorna-fast/fraud-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project introduction in English

Financial Fraud Detection System - Technical Documentation

GitHub GitHub

Table of Contents


Project Overview

This system uses the Gradient Boosting Algorithm to detect fraudulent financial transactions with high accuracy. The project covers the complete pipeline from data analysis to UI implementation, including a Streamlit-based interface for real-time processing and result visualization.

Sample Output


Key Features

  • 🕵️ Exploratory Data Analysis (EDA) with 7+ professional visualizations
  • 🚀 Model with 98% AUC-ROC accuracy
  • 📊 Web-based UI using Streamlit
  • 🔄 Real-time data processing capability
  • 📈 Comprehensive documentation

Installation & Setup

Prerequisites

  • Python 3.9+
  • pip

Installation Steps:

git clone https://github.com/sorna-fast/fraud-detection.git
cd fraud-detection
pip install -r requirements.txt

Project Structure

fraud-detection/
├── apps/                  # Core application code
│   ├── src/              # Processing modules
│   └── data/             # Data processing & splitting
├── model/                # Trained model
│   └── gb_classifier.pkl
├── notebooks/            # Data analytics and model training
│   ├── Fraud_Detection_EDA_Model_Training_FA.ipynb (Persian comments)
│   └── Fraud_Detection_EDA_Model_Training_EN.ipynb (English comments)
├── visualizations/       # Visualization outputs
│   ├── confusion_matrix_test.png
│   └── roc_curve.png
        ...
├── .gitignore
├── app.py                # Application entry point
├── README.md
└── requirements.txt

Running the Application

To launch the web interface:

streamlit run app.py

Technical Documentation

1. Dataset

  • File Name: fraud_dataset_mod.csv
  • Key Characteristics:
    • 17 numerical & categorical features
    • 50,001 records
    • Balanced using RandomUnderSampler

2. Model

  • Algorithm: Gradient Boosting Classifier + RandomUnderSampler
  • Accuracy: 98% AUC-ROC
  • Input: 12 processed features
  • Output: Fraud probability (0-1)

3. Visualizations

File Name Description
categorical_distribution.png Categorical feature distribution
numeric_features_boxplot.png Outlier analysis

Requirements

Full requirements list available in requirements.txt


License

This project is licensed under the MIT License.


👋 We hope you find this project useful! 🚀

Contact Developer

Email: [email protected] 
Telegram: https://t.me/Fast_programmer

🔗 GitHub Profile: sorna-fast

Project introduction in Persian

سیستم تشخیص تقلب در تراکنش‌های مالی - مستندات فنی

GitHub GitHub

فهرست مطالب

معرفی پروژه

این سیستم با استفاده از الگوریتم Gradient Boosting قادر به تشخیص تراکنش‌های مالی تقلبی با دقت بالا است. پروژه شامل مراحل کامل از تحلیل داده تا پیاده‌سازی رابط کاربری می‌باشد و از محیط کاربری استریملیت برای نمایش نتایج و پردازش داده‌های جدید استفاده می‌کند.

نمونه خروجی

ویژگی‌های کلیدی

  • 🕵️ تحلیل اکتشافی داده (EDA) با ۷+ نمودار حرفه‌ای
  • 🚀 مدل با دقت 98% AUC-ROC
  • 📊 رابط کاربری تحت وب با Streamlit
  • 🔄 قابلیت پردازش بلادراز داده‌های جدید
  • 📈 مستندات کامل و آماده انتشار

نصب و راه‌اندازی

پیش‌نیازها

  • Python 3.9+
  • pip

مراحل نصب:

git clone https://github.com/sorna-fast/fraud-detection.git
cd fraud-detection
pip install -r requirements.txt

ساختار پروژه

fraud-detection/
├── apps/                  # کدهای اصلی برنامه
│   ├── src/              # ماژول‌های پردازشی
│   └── data/             # پردازش و تقسیم داده
├── model/                # مدل آموزش دیده
│   └── gb_classifier.pkl
├── notebooks/            #  تحلیل‌های داده و آموزش مدل
│   ├── Fraud_Detection_EDA_Model_Training_FA.ipynb (کامنت‌های فارسی)
│   └── Fraud_Detection_EDA_Model_Training_EN.ipynb (کامنت‌های انگلیسی)
├── visualizations/       # خروجی نمودارها
│   ├── confusion_matrix_test.png
│   └── roc_curve.png
        ...
├── .gitignore
├── app.py                # نقطه ورود برنامه
├── README.md
└── requirements.txt

اجرای برنامه

برای اجرای رابط کاربری:

streamlit run app.py

مستندات فنی

۱. دیتاست

  • نام فایل: fraud_dataset_mod.csv
  • ویژگی‌های کلیدی:
    • 17 ویژگی عددی و دسته‌ای
    • 50001 رکورد
    • متوازن‌سازی شده با RandomUnderSampler

۲. مدل

  • الگوریتم: Gradient Boosting Classifier + RandomUnderSampler
  • دقت: ۹8% AUC-ROC
  • ورودی: ۱۲ ویژگی پردازش شده
  • خروجی: احتمال تقلب (۰ تا ۱)

۳. ویزوالایزیشن‌ها

نام فایل توضیحات
categorical_distribution.png توزیع ویژگی‌های دسته‌ای
numeric_features_boxplot.png تحلیل داده‌های پرت

لیست نیازمندی‌ها

مشاهده کامل نیازمندی‌ها در requirements.txt


مجوز

این پروژه تحت مجوز MIT منتشر شده است.

👋 امیدواریم این پروژه برای شما مفید باشد! 🚀

ارتباط با توسعه‌دهنده

ایمیل: [email protected] 
تلگرام: https://t.me/Fast_programmer

🔗 حساب گیتهاب: sorna-fast


Releases

No releases published

Packages

No packages published