KTMB ETS Ridership Surge Prediction & TreeSHAP Engine
Python · NumPy · TreeSHAP · pandas · Open-Meteo API · HTML/CSS/JS dashboard
Explainable Random Forest for KTMB ETS Ridership Surge Prediction
- Implemented a Random Forest from scratch in NumPy, forecasting daily ridership across 21 districts on 2.2M hourly trip records (2023–2026) joined with Malaysia public holidays, DOSM demographics, and Open-Meteo weather.
- Cut network-level forecast error to 4.1% MAPE on May–Dec 2025 test data vs 6.4% naive baseline (6.7% vs 9.4% on festive days).
- Explained every prediction with TreeSHAP (also written from scratch in NumPy) verified against brute-force Shapley values; showed festive weeks and holiday eves raise ridership while Ramadan lowers it.
- Built a live web dashboard with 2026 holdout evaluation, live weather fetch, and SHAP feature-contribution charts.