# Powering the Last Mile: Targeting Off-Grid Solar Customers in Nigeria
Ranking North-west Nigerian households by willingness to pay for solar devices so a pay-as-you-go solar company can spend its outreach budget where conversion is most likely. Built on World Bank Multi-Tier Framework (MTF) survey microdata, including its embedded randomized-price experiment.
**Live demo:** solar-targeting-nigeria.onrender.com — upload a household CSV, get back a ranked contact list. Don't have the data? The field guide gives the exact question wording and coding scheme for all 32 features, with a blank template to fill in. (Free tier: the first request may take 30–60 seconds to wake the service.)
**For non-technical readers:** the two-page client brief states the result in outreach economics — what the ranking is worth per 1,000 field visits, and the one group for which it should not be followed without review.
## Headline Result
Evaluated on a held-out test set by **precision at the top 20%** of model-ranked households — the metric that matches the deployment decision ("which fifth of households should a vendor contact?"). Random-outreach base rate: **29.0%**.
| Targeting strategy | Top-20% conversion | Lift vs. random | Test ROC-AUC |
|---|---|---|---|
| Random outreach | 29.0% | 1.0× | — |
| Decision tree (tuned) | 51.9% | 1.79× | 0.733 |
| Random forest | 60.8% | 2.10× | 0.799 |
| **Gradient boosting (best)** | **63.5%** | **2.19×** | 0.796 |
All three models go through the identical procedure: hyperparameters chosen by 5-fold cross-validation *inside* the training set (2,718 households), then a single scoring pass on the held-out test set (907 households), same 32-feature matrix throughout. The differences are therefore attributable to the algorithm rather than to the inputs or to the tuning budget.
Two things this table does **not** say. It is not the performance of the deployed artifact: once gradient boosting was selected, the model shipped in `app/model.joblib` w …