Solving the Maji Ndogo Water Crisis: An applied machine learning project for detecting anomalies and potential fraud in Maji Ndogo water infrastructure data using Isolation Forest, One-Class SVM, and Logistic Regression.
# 💧 Maji Ndogo Water Security & Fraud Identification System
An applied machine learning system and operational audit framework developed for the Ministry of Water in **Maji Ndogo**. The system detects statistical anomalies, potential data falsification, and corruption in field employee survey logs to prioritize manual investigative reviews.
---
## 📌 Project Overview
Maji Ndogo faces a severe water security crisis affecting over 27 million residents who rely on contaminated wells, broken tap infrastructure, or unprotected rivers. To allocate infrastructure repair budgets effectively, field employees submit water quality and source inspection surveys.
However, manual field data collection is vulnerable to data falsification (e.g., corrupt inspectors submitting fake clean scores for contaminated wells to avoid repair work or pocket funds).
This project provides an automated **Anomaly Detection & Fraud Identification Engine** to:
1. Identify suspicious survey entries using unsupervised and supervised ML.
2. Rank field employees by statistical risk profiles for internal audit.
3. Expose interpretable risk factors for individual record reviews.
4. Serve real-time predictions via a **FastAPI REST API** and an interactive **Streamlit Dashboard**.
---
## 🎯 Objectives & Value
- **Leakage-Free Feature Engineering**: Computes chronological expanding historical aggregates to prevent temporal or target data leakage.
- **Multi-Model Anomaly Detection**: Combines Isolation Forest, One-Class SVM, and Logistic Regression with validation-optimized ensemble weighting.
- **Operational Risk Scoring**: Converts raw anomaly scores into operational risk categories (`Requires Investigation (High Risk)`, `Medium Risk`, `Low Risk`).
- **Audit Prioritization**: Ranks high-risk field employees to maximize internal investigation efficiency.
- **Production Readiness**: Fully containerized with Docker, covered by automated unit tests, CI/CD, REST API, and interactive dashboard.
--- …