Machine Learning model to predict maize yield in Kenya using Ridge Regression, plus Tableau dashboards
# Maize_Yield_prediction
Machine Learning model to predict maize yield in Kenya using Ridge Regression, plus Tableau dashboards
# 🌾 Kenya Maize Yield Prediction using Ridge Regression
This project explores how Machine Learning can help predict **maize crop yield** based on key agricultural factors like rainfall, soil quality, fertilizer usage, and pest attacks. The goal is to support farmers, NGOs, and policymakers in making data-informed decisions for food security and sustainable agriculture.
---
## 🔍 Problem Statement
Inconsistent yields across different Kenyan regions impact farmer income and national food stability. This project uses a realistic agricultural dataset to predict **current maize yield (in tonnes per hectare)** and identify **key factors that influence it**.
---
## 🧠 Tools & Technologies
| Category | Tools Used |
|----------------|-----------------------------------------------|
| Programming | Python, Pandas, Scikit-learn |
| ML Model | Ridge Regression (with Regularization) |
| Visualization | Seaborn, Matplotlib, **Tableau** |
| Data Cleaning | Numpy, Label Encoding, One-Hot Encoding |
| Deployment (later) | Streamlit (planned) |
| Reporting | Jupyter Notebook, GitHub |
---
## 📊 Features Used in the Model
- **Region, County**
- **Soil Quality**
- **Average Rainfall (mm)**
- **Fertilizer Type & Usage**
- **Seed Type**
- **Farming Method (Manual vs Mechanized)**
- **Pest Attack Level**
- **Previous Season Yield**
- **Altitude & Temperature**
- **Planting Season**
Target Variable:
- `Current_Yield_tonnes_per_hectare`
---
## 📈 Tableau Visualizations (In Progress)
The Tableau dashboard will help visualize insights like:
- 📍 Yield distribution across **Kenyan counties/regions**
- 🌦️ Correlation between **rainfall/fertilizer and yield**
- 🚜 Manual vs Mechanized farming yield comparison
- 🐛 …