Skip to content

tarekmasryo/fraud-detection-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💳 Credit Card Fraud Detection Dashboard

Streamlit
License: Apache 2.0
Made with ❤️ by Tarek Masryo


📌 Overview

Interactive dashboard built with Streamlit, Plotly, and Scikit-learn for real-time fraud detection analysis.
It demonstrates a business-aware ML pipeline on the classic Credit Card Fraud Dataset (284,807 transactions, only 492 frauds ≈ 0.17%).

  • 🔍 Upload your own transaction CSV or use the built-in dataset
  • ⚖️ Custom decision thresholds with cost-sensitive analysis
  • 📊 Confusion matrix, ROC/PR curves, and cost–threshold visualization
  • 💡 Permutation feature importance for interpretability
  • 🧾 Segmented performance profiling (by amount, time of day, etc.)

📊 Dashboard Preview

Data Overview

Data

Prediction Engine

Prediction

Model Metrics

Metrics

Model Insights

Insights

Data Quality & Segments

Segments


🔑 Features

  • Models: RandomForest & XGBoost (calibrated)
  • Presets: Strict / Balanced / Lenient thresholds
  • Threshold Finder: auto-select by target Precision/Recall
  • Cost Analysis: business-aligned FP vs FN costs
  • Visuals: Confusion matrix, ROC, PR, cost vs threshold curves
  • Insights: Permutation importance, segmented KPIs
  • Data Handling: automatic schema validation + engineered features (log(Amount), business hours, night proxy)

🚀 Run Locally

Clone the repo and install requirements:

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

Run the app:

streamlit run app.py

Related Repositories

If you use this dashboard, please credit as:

Fraud Detection Dashboard by Tarek Masryo.
Code licensed under Apache 2.0

About

fraud-detection-dashboard

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages