Logo Lanfrica

amin03941/ghana-rainfall

Domaine:

climate

Type de record:

softwareproject
Créateur:
ami
Hôte:
# 🥈 2nd Place Solution - Ghana's Indigenous Intel Challenge **Author:** Mohamed Amin Kharrat **Competition:** [Zindi - Ghana's Indigenous Intel Challenge]zindi.africa **Final Rank:** 2nd / 500+ participants **Private Score:** 0.97 --- ## 📊 Overview This repository contains the complete solution that achieved **2nd place** in Zindi's Ghana Indigenous Weather Forecasting Challenge. The approach combines traditional indigenous ecological knowledge with modern machine learning through an advanced ensemble system. ### Key Achievements - ✅ Full SHAP explainability analysis - ✅ Leak-safe cross-validation strategy - ✅ Domain-specific feature engineering (Ghana seasonal patterns) --- ## 🚀 Quick Start ### Requirements ```bash pip install -r requirements.txt ``` ### Run the Solution ```bash # Option 1: Run the complete notebook jupyter notebook notebook.ipynb # Option 2: Run modular scripts python src/preprocessing.py python src/feature_engineering.py python src/models.py ``` --- ## 🧠 Solution Approach ### 1. **Data Preprocessing** - Deterministic byte-stable cleaning pipeline - Missing value flagging (3 binary features) - Text normalization and imputation ### 2. **Feature Engineering** (The Core Differentiator) - **Cyclical temporal encoding** (sin/cos for hour, month, day) - **Ghana-specific seasonal features** (bimodal rainy seasons) - **TF-IDF on indigenous descriptions** (50 features, bigrams) - **Confidence interactions** (polynomial + cross-features) - **Leak-safe aggregations** (user/community/district stats) ### 3. **Model Ensemble** - **LightGBM** (35%) - Fast, leaf-wise growth - **XGBoost** (35%) - Strong regularization - **CatBoost** (30%) - Categorical handling - **Meta-learner:** Logistic Regression on stacked OOF predictions ### 4. **Validation Strategy** - Stratified 10-fold CV - Leak-safe per-fold aggregation recalculation - Early stopping (200 rounds patience) - Balanced class weighting -- …