# πΎ Ethiopian Food Price Prediction β ML Pipeline
> **WFP Market Price Data Β· 60,343 records Β· 96 Commodities Β· 128 Markets Β· 2000β2026**
> Masters Program β Machine Learning Final Project Β· 2026
---
## π Project Overview
Food price volatility in Ethiopia directly impacts food security for millions of people. This project builds a full **machine learning pipeline** that predicts retail and wholesale food prices (ETB) across 128 Ethiopian markets and 96 commodity types, using 26 years of WFP market price data.
The project is deployed as a **Streamlit web application** where users can select a commodity, market, and forecast date to instantly predict the expected price.
### Results
| Metric | Value |
|---|---|
| Best Model | RandomForest (tuned) |
| Test RΒ² | **0.872** β 87.2% of variance explained |
| Test RMSE | **1,245 ETB** average error |
| Test MAE | **668 ETB** median absolute error |
| Train RΒ² | 0.966 (healthy gap β not severe overfitting) |
---
## π Project Structure
```
food_price_prediction/
βββ data/
β βββ wfp_food_prices_eth.csv β WFP price data (place here)
βββ models/ β auto-created by train.py
β βββ best_model.pkl β fitted sklearn Pipeline
β βββ encoders.pkl β LabelEncoders for Streamlit dropdowns
β βββ feature_names.json β metadata, metrics, commodity lists
β βββ training_report.txt β human-readable performance summary
β βββ eda_report.png β 4-panel EDA chart
β βββ diagnostics.png β residuals + feature importance chart
βββ train.py β full 8-step ML pipeline
βββ app.py β Streamlit deployment app
βββ requirements.txt β Python dependencies
```
---
## βοΈ Quick Start
### 1. Install dependencies
```bash
pip install -r requirements.txt
```
### 2. Train the model (runs all 8 pipeline steps)
```bash
python train.py
```
Expected runtime: **5β15 minu β¦