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.
🔗 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.
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.
| Item | Value |
|---|---|
| Algorithm | Random Forest Classifier |
| Problem Type | Binary Classification |
| Target Variable | Fraud (0 = Safe, 1 = Fraud) |
| Class Imbalance | Class Weighting |
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
- ✅ Real-time fraud prediction
- 📈 Fraud probability score
- 📊 Risk visualization
- 🌐 Interactive Streamlit dashboard
- ⚡ Instant predictions
- 🤖 Machine Learning powered
- Python
- Streamlit
- Pandas
- NumPy
- Scikit-learn
- Matplotlib
- Joblib
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
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
- Add SHAP explainability
- Compare Random Forest with XGBoost
- Deploy a FastAPI backend
- Add email notifications
- Improve dashboard analytics
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!




