final year school project on a machine learning system that predicts demand and pricing of matatus in Kenya
# matatu_ml
Final year school project on a machine learning system that predicts demand and pricing of matatus in Kenya
## π Project Overview
This project develops a comprehensive machine learning system that:
- **Predicts demand** for matatu (mini-bus) services in Kenya
- **Optimizes pricing** strategies based on demand patterns and market conditions
- **Analyzes surge pricing** opportunities across different routes
## π Features
- Data-driven insights from real matatu operations
- Advanced ML models (XGBoost, Neural Networks)
- Demand forecasting and trend analysis
- Revenue optimization through surge pricing simulation
- Interactive web dashboard (Streamlit)
## π οΈ Technologies Used
- **Python** - Core programming language
- **Pandas & NumPy** - Data manipulation and analysis
- **Scikit-learn** - Machine learning algorithms
- **XGBoost** - Gradient boosting models
- **TensorFlow/Keras** - Deep learning models
- **Plotly** - Interactive visualizations
- **Streamlit** - Web application framework
## π Project Structure
```
matatu_ml/
βββ 01_data_ingestion.ipynb # Data collection and loading
βββ 02_preprocessing.ipynb # Feature engineering and cleaning
βββ 03_model_training_evaluation.ipynb # Traditional ML models
βββ 04_XGBoost_model_training.ipynb # Advanced gradient boosting
βββ 05_surge_simulation.ipynb # Pricing simulation and analysis
βββ app.py # Streamlit web application
βββ requirements.txt # Python dependencies
βββ data/ # Dataset and outputs
```
## π Quick Start
### Prerequisites
- Python 3.8+
- pip or conda
### Installation
1. Clone the repository:
```bash
git clone
github.com
cd matatu_ml
```
2. Create a virtual environment:
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
3. Install dependencies:
```bash
pip install -r requirements.txt
```
### Running the S β¦