# Somalia Displacement Severity Classifier
A machine learning project that predicts whether an incoming displacement event in Somalia will be large (affecting more than 100 people) or small — based on early signals like the cause, region, month, and event duration.
Built as the capstone project for the Goobo Labs DS/ML Bootcamp 2026.
---
## Problem
Humanitarian organizations operating in Somalia — UNHCR, OCHA, Medair — need to pre-position supplies and staff before a displacement event peaks. Waiting for the full picture is already too late. This model gives field officers a severity prediction from just 4 inputs, creating a 1–3 week window to respond.
---
## Dataset
- **Source:** Internal Displacement Monitoring Centre (IDMC) via HDX
- **Link:**
data.humdata.org
- **Size:** 3,091 displacement events (2025–2026)
- **Target:** `is_large_event` — 1 if more than 100 people displaced, 0 otherwise
---
## Models Trained
| Model | Accuracy | Recall | F1-Score |
| ------------------- | -------- | ------ | -------- |
| Logistic Regression | — | — | — |
| Random Forest | — | — | — |
| XGBoost ✅ | — | — | — |
> **Best model: XGBoost** — selected by highest Recall. In humanitarian response, missing a large event (false negative) is more costly than a false alarm.
---
## Project Structure
```
somalia-displacement-classifier/
├── dataset/
│ ├── som_idmc_idu_events.csv ← raw data
│ └── clean_dataset.csv ← generated by notebook 01
├── notebooks/
│ ├── 01_eda_and_preprocessing.ipynb
│ └── 02_modeling.ipynb
├── api/
│ ├── app.py ← FastAPI backend
│ └── index.html ← UI
├── models/
│ ├── best_model.pkl ← XGBoost (best)
│ ├── lr_model.pkl
│ ├── rf_model.pkl
│ ├── scaler.pkl
│ └── label_encoders.pkl
├── README.md
├── requirements.txt
└── project_paper.md
```
--- …