Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚨 Fraud Detection System

Python Scikit-Learn Streamlit Pandas NumPy


📌 Project Overview

This project is an end-to-end Machine Learning application that detects fraudulent financial transactions using a Random Forest Classifier.

Built with Python and Streamlit, the application predicts whether a transaction is fraudulent, provides a fraud probability score, and presents the result through an intuitive dashboard designed for real-time decision-making.


🌐 Live Demo

🔗 https://fraud-detection-system-xhtapccyai4u7weahuzfzt.streamlit.app/

Note: This application is hosted on the free Streamlit Community Cloud. If the application is asleep, simply click "Yes, get this app back up!" It usually starts within a minute.


🎯 Business Problem

Financial fraud results in significant losses for banks, payment providers, and businesses worldwide.

The objective of this project is to assist in identifying suspicious transactions early, allowing organizations to reduce financial losses and improve fraud prevention through machine learning.


🤖 Machine Learning Model

Item Value
Algorithm Random Forest Classifier
Problem Type Binary Classification
Target Variable Fraud (0 = Safe, 1 = Fraud)
Class Imbalance Class Weighting

📊 Dataset

This project uses the Kaggle Credit Card Fraud Detection Dataset.

https://www.kaggle.com/datasets/mlg-ulb/creditcardfraud

Dataset characteristics:

  • Real-world financial transactions
  • Highly imbalanced dataset
  • Anonymous features (V1–V28)
  • Suitable for fraud detection research

✨ Features

  • ✅ Real-time fraud prediction
  • 📈 Fraud probability score
  • 📊 Risk visualization
  • 🌐 Interactive Streamlit dashboard
  • ⚡ Instant predictions
  • 🤖 Machine Learning powered

🛠️ Technology Stack

  • Python
  • Streamlit
  • Pandas
  • NumPy
  • Scikit-learn
  • Matplotlib
  • Joblib

📂 Project Structure

fraud-detection-system
│
├── app
│   └── app.py
│
├── data
│   └── creditcard.csv
│
├── models
│   ├── model.pkl
│   └── features.pkl
│
├── screenshots
│   ├── Home.png
│   ├── SafeTransaction.png
│   ├── SafeTransactionchart.png
│   ├── FraudDetected.png
│   └── FraudDetectedchart.png
│
├── train_model.py
├── requirements.txt
└── README.md

📸 Application Preview

🏠 Home Screen

Home


✅ Safe Transaction Prediction

Safe Transaction

Safe Chart


🚨 Fraud Detection

Fraud Detected

Fraud Chart


💼 Business Impact

This solution demonstrates how machine learning can support financial institutions by:

  • Detecting suspicious transactions earlier
  • Reducing potential financial losses
  • Supporting faster fraud investigations
  • Improving operational decision-making

🚀 Future Improvements

  • Add SHAP explainability
  • Compare Random Forest with XGBoost
  • Deploy a FastAPI backend
  • Add email notifications
  • Improve dashboard analytics

👨‍💻 Author

Craig Chiambiro

🎓 BSc Information Technology (Data Science)

💼 Software Developer | Data Analyst | Machine Learning Enthusiast

🔗 GitHub: https://github.com/CraigChiambiro

💼 LinkedIn: https://www.linkedin.com/in/craig-chiambiro-6b3394257


⭐ If you found this project useful, consider giving it a star!

About

Machine Learning fraud detection system using Random Forest, Python, Streamlit, and Scikit-learn.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages