Machine learning project for predicting food prices in Uganda using WFP food price data
Uganda Food Price Prediction Using Machine Learning
Project Overview
This project uses machine learning to predict food prices in Uganda using historical food price data from the World Food Programme (WFP).
The project explores historical food price patterns, identifies important factors associated with food prices, and develops predictive models that can support food price analysis and decision-making.
Problem Statement
Food prices in Uganda vary across commodities, locations, markets, and time. Accurately estimating food prices can therefore be challenging.
This project investigates whether machine learning can be used to predict food prices using historical market and commodity information.
Objectives
The main objective is to develop a machine learning model for predicting food prices in Uganda.
Specific objectives are to:
- Analyze historical food price patterns.
- Identify factors associated with food prices.
- Prepare and transform the dataset for machine learning.
- Develop and compare machine learning models.
- Evaluate model performance using appropriate regression metrics.
- Identify the best-performing model.
Dataset
The dataset used in this project is the Uganda Food Prices dataset from the World Food Programme (WFP).
Original Dataset
- Country: Uganda
- Observations: 30,933
- Features: 16
- Target variable: Price
Important variables include:
- Date
- Admin1
- Admin2
- Market
- Latitude
- Longitude
- Category
- Commodity
- Unit
- Pricetype
- Price
After data cleaning and feature preparation, the final modelling dataset contained 23,384 observations and 11 input features before categorical encoding.
Data Preparation
The dataset was prepared for machine learning through the following steps:
- Examining the dataset structure and data types
- Checking missing values and duplicate records
- Cleaning the dataset
- Creating year and month features from the date
- Encoding categorical variables
- Selecting relevant features
- Splitting the dat …