Logo Lanfrica
  • Accueil
  • Atlas
  • Analyses
  • Documentation
  • Sign in

© 2026 Lanfrica. Tous droits réservés. Tous les droits d'auteur des ressources affichées sur le site Web Lanfrica appartiennent aux détenteurs de droits d'auteur d'origine, sauf indication contraire explicite.

Anne-Kiragu/kenya-port-forecast

Domaine:

mobility

Type de record:

softwaremodel
Créateur:
Ann
Hôte:
Prediction of Port Throughput using Machine Learning # Kenya Port Throughput Forecaster A publicly deployable Streamlit web application implementing the **Two-Stage Zero-Inflated Stacking Ensemble (Hybrid 1)** for daily cargo throughput forecasting at Mombasa and Lamu ports. ## Architecture - **Stage 1:** LightGBM binary classifier — predicts whether a port day is active (ROC-AUC > 0.99) - **Stage 2:** Random Forest + LightGBM + SVR base models blended by Ridge meta-learner - **Test set performance:** R² = 0.9939, MAE = 1,777 tonnes, RMSE = 4,145 tonnes ## Files | File | Purpose | |------|---------| | `app.py` | Main Streamlit application | | `model.pkl` | Trained Hybrid 1 pipeline (all models + preprocessor) | | `requirements.txt` | Python dependencies | | `.streamlit/config.toml` | App theme and server config | ## Deploy on Streamlit Community Cloud (free, public URL) 1. Push this folder to a **GitHub repository** (public or private) 2. Go to share.streamlit.io and sign in with GitHub 3. Click **New app** 4. Select your repository, branch (`main`), and set **Main file path** to `app.py` 5. Click **Deploy** — your app gets a public URL like `yourname-portforecast.strea…` > **Important:** `model.pkl` must be in the repo root alongside `app.py`. GitHub has a 100 MB file limit. If `model.pkl` exceeds this, use Git LFS: > ```bash > git lfs install > git lfs track "*.pkl" > git add .gitattributes > ``` ## Run locally ```bash pip install -r requirements.txt streamlit run app.py ``` Then open localhost ## Data source HDX PortWatch (OCHA / IMF) — daily AIS-based port activity data for Mombasa and Lamu, Kenya. Period: January 2019 – November 2025 · 5,048 observations. ## Reference Kiragu, A.W. (2025). *Machine Learning-Based Forecasting and Optimization of Port Throughput Using Daily Maritime Activity from Kenyan Ports*. Strathmore University MSc Data Science.

Visit

github.com

Languages

Kenyan Sign LanguageSwahili, Coastal

Similaires

Duncan-Kiragu/Mboka-AIomarishevo/kenya-portKiragu/whisper-small-kikuyu-v4Kiragu/whisper-small-kikuyu-v5mbuguakevvz/kenya-demand-forecastdeclerke/Kenya-Crop-Forecast

Duncan-Kiragu/Mboka-AI

Voice-first listing starter for Kenya's jua kali traders. Speak a listing, hear it read back, confir

omarishevo/kenya-port

# 🚢 KPA Vehicle Traffic & Congestion Analytics Dashboard > **Kenya Ports Authority — Policy and Res

Kiragu/whisper-small-kikuyu-v4

Kiragu/whisper-small-kikuyu-v5

mbuguakevvz/kenya-demand-forecast

Demand Forecasting & Inventory Optimization Pipeline for Kenyan Retail # Kenya Demand Forecasting &

declerke/Kenya-Crop-Forecast

# 🌾 Kenya Crop Yield Forecaster **A production-grade agricultural intelligence pipeline that fetche