This project demonstrates the practical application of machine learning to address real-world food security challenges. By providing reliable price forecasts, we can support better decision-making across the agricultural value chain in Cameroon.
# πΎ Cameroon Food Price Forecasting
## π Project Overview
A comprehensive machine learning system for forecasting food prices across different regions in Cameroon using time series analysis and multiple ML models.
### π― Key Features
- **Data Processing**: Clean and standardize WFP food price data
- **Model Training**: XGBoost, Random Forest, CatBoost, and LSTM models
- **Forecasting**: 6-month price predictions with confidence intervals
- **Web Interface**: Interactive Streamlit dashboard
- **Risk Assessment**: Automated risk level classification
### π Models Used
1. **XGBoost** - Gradient boosting with regularization
2. **Random Forest** - Ensemble decision trees
3. **CatBoost** - Categorical feature handling
4. **LSTM** - Deep learning for sequence prediction
### π Quick Start
#### 1. Clone Repository
```bash
git clone
github.com
cd cameroon-food-forecasting
```
#### 2. Install Dependencies
pip install -r scripts/requirements.txt
#### 3. Run Analysis Pipeline
### Open Jupyter Lab
bash
jupyter lab
Run notebooks:
1. FootPredictionModel.ipynb
2. Run the codes inorer: 1-4
### 4. Launch Web App
bash
streamlit run scripts/PredictionApp.py
### π Project Structure
cameroon-food-forecasting/
βββ notebooks/ # Jupyter notebooks for analysis
βββ scripts/ # Python scripts and app
βββ data/ # Raw and processed data
βββ models/ # Trained ML models
βββ visualizations/ # Generated plots and charts
### π Results
Average Forecast Error: 12.5% SMAPE
Best Performing Model: XGBoost (for most commodities)
Most Predictable: Beans in ExtrΓͺme-Nord region
Most Volatile: Fresh fish in coastal regions
### π οΈ Technologies Used
Python: pandas, numpy, matplotlib, seaborn
ML Libraries: scikit-learn, xgboost, catboost, tensorflow
Visualization: Plotly, Streamlit
Deployment: GitHub, Streamlit Cloud
### π₯ Contributors
Nsaichie Berinyuy Nyeanchi - Data Scientist/Analyst
### π License
MIT L β¦