AfyaMetrix is a pan-Africa public health intelligence platform that uses machine learning to detect disease outbreaks, forecast trends, allocate resources, and generate multilingual health narratives across 10 African countries and 68 regions. This repository contains the AI/ML engineering module.
# AfyaMetrix — Pan-Africa Public Health Intelligence Platform
## AI/ML Engineering Module
**Author:** Omosomi Ann Hassan (AI/ML Engineer)
**Programme:** AI/ML Engineering — Africa Agility (AGIT)
**Project Type:** Group Capstone Project
---
## Project Overview
AfyaMetrix is a pan-Africa public health intelligence platform that uses machine learning to detect disease outbreaks, forecast trends, allocate resources, and generate multilingual health narratives across 10 African countries and 68 regions.
This repository contains the **AI/ML engineering module** — including all custom models, data pipelines, and the FastAPI backend that powers the platform.
---
## What's Inside
```
afyametrix/
├── api/
│ └── main.py # FastAPI backend — 12+ endpoints
├── data/
│ ├── raw/
│ │ └── africa_health_simulated.csv
│ └── processed/ # All model outputs (CSV)
├── notebooks/
│ ├── 00_setup.ipynb # Environment setup
│ ├── 01_data_simulation.ipynb # Synthetic data generation
│ ├── 02_anomaly_detection.ipynb # Z-Score + Isolation Forest
│ ├── 03_risk_scoring.ipynb # Composite risk scoring
│ ├── 04_forecasting.ipynb # Prophet time-series forecasting
│ ├── 05_clustering.ipynb # K-Means clustering + maps
│ ├── 06_resource_allocation_narrative.ipynb
│ ├── 07_run_api.ipynb # API testing
│ ├── 08_voice_assistant.ipynb # Voice query interface
│ └── 09_shap_explainability.ipynb # SHAP explainability
├── models/saved/ # Trained model files
├── outputs/
│ ├── maps/
│ └── reports/
└── utils/ # Helper functions
```
## AI/ML Models Built
| Model | Purpose | Library |
|-------|---------|---------|
| Isolation Forest | Anomaly detection in disease reports | scikit-learn |
| Z-Score Detection | Statistical spike identification | numpy/scipy |
| Prophet | 30-day disease outbreak forecasting | prophet |
| K-Means Clustering | Regional risk cluster class …