# 🌧️ RAIL: Indigenous Weather Forecasting - Complete Classification Pipeline
This repository contains a comprehensive machine learning pipeline for predicting rainfall types using indigenous ecological indicators, built for the Zindi RAIL (Responsible Artificial Intelligence Lab) challenge.
## 📋 Challenge Overview
**Goal:** Build a complete classification pipeline to predict the type of rainfall (Target) in the next 12–24 hours using indigenous ecological indicators and rainfall data.
**Evaluation metric:** Macro F1 Score
**Output:** submission.csv with columns [ID, Target]
**Model format required:** ONNX (for eligibility)
**Explainability requirement:** Include SHAP visualizations that highlight the most influential features for predictions.
## 🚀 Quick Start
### 1. Install Dependencies
```bash
pip install -r requirements.txt
```
### 2. Run the Complete Pipeline
Open and run the Jupyter notebook:
```bash
jupyter notebook indigenous_weather_forecasting_complete.ipynb
```
Or run it directly:
```bash
jupyter nbconvert --to notebook --execute indigenous_weather_forecasting_complete.ipynb
```
## 📊 Pipeline Features
### ✅ Complete Implementation
1. **Data Loading & EDA** - Comprehensive exploratory data analysis
2. **Feature Engineering** - Categorical encoding and numeric scaling
3. **Stratified Train-Validation Split** - Maintains class balance
4. **XGBoost Model Training** - Strong baseline classifier
5. **Model Evaluation** - Macro F1 score and detailed metrics
6. **SHAP Explainability** - Multiple visualization types
7. **Test Predictions** - Submission file generation
8. **ONNX Export** - Model serialization for production
9. **ONNX Validation** - Prediction consistency testing
10. **Feature Analysis** - Top 5 most important features with interpretations
### 📈 Generated Outputs
The pipeline generates the following files:
#### 📄 Submission Files
- `submission.csv` - Final predictions for test set
#### 🧠 Model Files
- `model.onnx` - Trained model in ONNX …