Knowing the average traffic speeds helps in finding the quickest and most reliable routes. It also allows partners’ drivers and Yango to provide accurate estimated time of arrival (ETA) times for users.
# 4th Place Solution For The Accra Mobility Prediction Hackathon
## 1. Overview and Objectives
Solution Purpose: The task involves predicting the average speed of vehicles in Accra based on temporal and spatial features. The solution aims to support urban mobility optimization, reduce traffic congestion, and enhance decision-making for transportation planning.
### Objectives:
Achieve high predictive accuracy with a reproducible workflow.
Provide a scalable, understandable solution for real-world deployment.
Ensure the submission adheres to Zindi’s code review standards.
## 2. Repository Structure
accra-mobility-prediction-hackathon.ipynb : Notebook containing the full implementation of the solution (data preprocessing, model training, and evaluation).
requirements.txt : List of dependencies with versions for reproducibility.
Dataset : Place the dataset file in the directory where the notebook resides. Specify paths in the notebook if needed.
## 3. Architecture Diagram
The solution flow:
### Extract:
Dataset is loaded directly from the Zindi-provided files.
### Transform:
Includes data cleaning, feature engineering, and scaling.
### Modeling:
Machine learning model (Ensemble model of LightGBM and Catboost gradient boosting models) is trained and validated.
### Inference:
Predictions are generated and saved in the required submission format.
## 4. Environment Setup
Install Python 3.11.
### Install dependencies with:
```bash
pip install -r requirements.txt
```
Use a Jupyter Notebook or compatible environment (e.g., Colab, Kaggle).
### Environment where this solution was developed:
Platform: Kaggle
GPU: None
RAM: 30 GB
Python Version: 3.11
## 5. Data Preprocessing (ETL Process)
### Extract:
1. Data loaded in CSV format as provided on the Zindi platform.
2. Ensure data files are in the correct paths before running the notebook.
### Transform:
Cleaning: Missing values and outliers addressed.
## Feature Engineering:
Merged the graph.csv file on these c …