ML-Powered Predictive Climate Intelligence & Early Warning System for Smallholder Farmers in Rural Nigeria — ALU Mission Capstone 2026
# Clisense - Osun River Corridor Pilot (Osogbo, Osun State)
ML-powered predictive climate intelligence and early warning for smallholder
farmers in **Osogbo, Osun State, Nigeria**, in the Osun River flood corridor.
The system benchmarks four machine-learning architectures on flood
classification and serves the champion through a REST API and a browser-based
forecast interface.
- **Forecast interface + API**:
clisense.onrender.com
- **API docs (Swagger)**:
clisense.onrender.com
- **Health check**:
clisense.onrender.com
- **Repository**:
github.com
## What it does
One prediction task for the Osogbo gauge / Osun River corridor:
1. **Flood classification** - is a given day a flood-risk day? (binary)
Four architectures are benchmarked against a naive persistence baseline:
**Random Forest**, **XGBoost**, **Decision Tree**, and a **Multi-Layer Perceptron**,
on real historical rainfall (see Dataset below). **MLP Neural Network** wins
(highest F1) and is the deployed champion.
## Results (2024 held-out test set, 366 records)
| Model | Flood accuracy | Flood F1 |
|-------|---------------:|---------:|
| Random Forest | 91.8% | 82.8% |
| XGBoost | 90.2% | 79.3% |
| Decision Tree | 86.9% | 73.3% |
| **MLP Neural Network (champion)** | **91.8%** | **83.9%** |
| Persistence baseline | 89.6% | 79.1% |
Random Forest and MLP tie on accuracy (91.8%); champion selection uses F1,
where MLP leads. Discharge features (current discharge and its 1- and 3-day
lags) account for ~74% of the champion's importance (permutation importance,
since MLP has no native `feature_importances_`). Full metrics are in
`models/benchmark_metrics.json`; figures are in `assets/`.
## Architecture
`app/model_core.py` is the single source of truth: it assembles the dataset,
engineers the features, and trains the champion flood-classification model
(whichever architecture the benchmark found best - see `CHAMPION_FLOOD_MODEL`).
`app/benchmark …