{"repo":"Victor-Kipruto-Rop/mpesa_safaricom-fraud_anomaly_detection","free":true,"listed":false,"github":"https://github.com/Victor-Kipruto-Rop/mpesa_safaricom-fraud_anomaly_detection","clone":"git clone https://github.com/Victor-Kipruto-Rop/mpesa_safaricom-fraud_anomaly_detection.git","description":"Real-time fraud detection engine for M-Pesa mobile money — Kafka/Flink streaming, ML-based risk scoring, and explainable multi-signal checks (velocity, SIM swap correlation, mule networks) feeding an interaction-aware decision engine, with a full production pipeline from ingestion through dbt analytics.","language":"Python","stars":12,"topics":["anomaly-detection","daraja-api","fraud-detection","mpesa","mpesa-api","safaricom","apache","apache-flink","apache-kafka","apache-spark"],"license":null,"category":"machine-learning","readme_excerpt":"M-Pesa Fraud Anomaly Detection System A production-grade, real-time fraud detection engine for M-Pesa mobile money transactions. It combines rule-based checks with machine learning scoring, multi-domain orchestration, circuit breaker resilience, and full audit logging. This is the standalone fraud detection component of the broader M-Pesa streaming platform. It contains the scoring engine, rule checks, ML artifacts, dashboards, deployment assets, and operational docs for local testing, staging validation, and deployment. Main entry points: the API service, scoring engine, dashboard app, and Docker Compose setup. Validate changes by running the unit/integration test suite, exercising the API locally, and confirming staging pipeline health. Quick Start Prerequisites: Python 3.10+, PostgreSQL 13+, Redis (optional — feature caching) Install: Run tests: Current coverage: 48% (1,991 statements, 30 passing tests). Train the ML model: Produces a calibrated classifier, a model card, and optional SHAP explanations. Architecture The engine scores each transaction in three layers: 1. Transaction-level checks — velocity, SIM swap, night-hour activity, mule accounts 2. ML scoring — HistGradientBoosting with calibrated probabilities 3. Decision aggregation — weighted scoring, circuit breaker, audit logging Full design details: docs/architecture.md Key Modules Module Purpose Coverage --- --- --- aggregator.py Score combination and decision logic 100% checks/ Individual fraud detectors 78–97%","default_branch":null,"files":null,"tree":[],"storefront":"/r/Victor-Kipruto-Rop","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Victor-Kipruto-Rop/mpesa_safaricom-fraud_anomaly_detection/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}