Early-warning ML tool flagging secondary-school students at risk of dropping out, from attendance and grades. 3MTT capstone, Nigeria. RandomForest, 85% recall on the at-risk class, SHAP explanations, Streamlit app.
# Student Dropout Risk Predictor for Secondary Schools
**3MTT Capstone Project | Nigeria**
A machine learning early-warning tool that scores a secondary-school student's risk of
finishing the year below the pass mark, places them in a Low / Medium / High band, and shows
the teacher exactly which factors drove that score.
Every number in this README was produced by running notebook.ipynb. Nothing
is estimated or copied from a paper. The notebook in this repository is saved with its
outputs, so each figure can be traced to the cell that produced it.
```
notebook.ipynb full pipeline, executed, with outputs and 44 passing assertions
app.py Streamlit app for teachers
models/ saved pipeline (preprocessing + SMOTE + RandomForest) via joblib
evaluation/ model_comparison.csv, metrics.json, and 14 plots
data/ UCI CSVs plus download_data.py
scripts/ build_notebook.py, and the verification scripts below
requirements.txt pinned versions
```
Three checks can be run at any time to confirm the repository is internally consistent:
```bash
python scripts/verify_repo.py # files present, notebook clean, docs match metrics.json,
# leakage guarantees hold, no em dashes
python scripts/verify_notebook.py # every cell executed, every assertion passed
python scripts/test_app.py # drives app.py through Streamlit's test harness and
# asserts each sample profile renders a band plus factors
```
`verify_repo.py` re-reads `evaluation/metrics.json` and asserts that each headline number
quoted in this README matches it, so the documentation cannot silently
drift away from the results.
---
## Problem
Nigeria carries one of the largest out-of-school populations in the world. UNESCO and UNICEF
estimates put the figure at roughly 10 to 20 million children, and the transition from junior
to senior secondary is one of the points where students are most likely to leave. The drivers
are well doc …