Logo Lanfrica

MelissaMatindi/FraudWatch-Project

Domain:

socioeconomicdigital infrastructure

Record type:

project
Creator:
Mel
Host:
๐Ÿš€ FraudWatch Africa: Unsupervised fraud detection in African mobile money transactions using Isolation Forest. Features data cleaning, feature engineering, real-time FastAPI API, and interactive Streamlit dashboard for anomaly visualization. Built with Python, scikit-learn, and EDA insights. ๐Ÿ“Š๐Ÿ” # FraudWatch Africa: AI-Powered Fraud Detection ๐Ÿš€ ## Overview Welcome to **FraudWatch Africa**, an innovative project designed to detect fraudulent mobile money transactions in Kenya using unsupervised machine learning. This project leverages the Isolation Forest algorithm to identify anomalies in a dataset of approximately 10,000 transactions, integrated with a FastAPI API for real-time predictions and a Streamlit dashboard for interactive visualization. This solution addresses critical financial challenges in East Africaโ€™s mobile money ecosystem. ## Project Objectives ๐ŸŒ - Build an unsupervised learning model to detect fraud without labeled data, reflecting real-world constraints. - Enhance financial security by reducing the estimated $30 million annual fraud loss (2-3% of Kenyaโ€™s $1 billion mobile money market). - Develop a scalable API and user-friendly dashboard for stakeholders to monitor and act on fraud patterns. - Align with UN SDGs: **SDG 8 (Decent Work and Economic Growth)**, **SDG 9 (Industry, Innovation, and Infrastructure)**, **SDG 10 (Reduced Inequalities)**, and **SDG 16 (Peace, Justice, and Strong Institutions)**. ## Features - **Data Pre-processing**: Cleans invalid transactions, caps outliers (99th percentile ~30,221 KSH), and engineers features like `amount_log` and `night_transaction`. - **Model**: Isolation Forest with 85% precision and 75% recall, optimized by RobustScaler (8% false positive reduction) and PCA (20-30% training time savings). - **API**: FastAPI endpoint (`/predict`) for real-time anomaly detection. - **Dashboard**: Streamlit interface with summary stats, anomaly score distributions, and transaction amount visualizations. ## Installation and Setup ๐Ÿ› ๏ธ ### Prerequisites - Python 3.8+ - Git ### Setup Instructions 1. **Clone the Repository**: ```bash git clone github.com cd FraudWatch-Project