AI / MLSoftware EngineeringBackendFrontendData EngineeringCompleted
Sri Lanka Port Export Cargo Predictor
A machine learning tool that predicts daily export cargo tonnage for Sri Lanka's four main ports, served through a REST API and a simple web form.
Machine Leaning(ML)ReactFast API
A small end to end machine learning project a gradient boosting model trained on Sri Lankan daily port activity data, served through a REST API and a web UI, so anyone can enter hypothetical port metrics and get a predicted export cargo volume.
Problem
Estimate that day's export-cargo tonnage for the port.
Solution
Engineer time and port features from ~10,000 rows of daily port activity data (2019–2025, four ports), then train a CatBoost regressor on a time based split 2019–2023 for training, 2024–2025 held out for testing, so there's no leakage from the future into the past. Use SHAP to check which features actually drive the prediction, then package the trained model, its feature list, and the port list as artifacts a FastAPI service loads at startup. A React + Vite form collects the four inputs and shows the predicted number.
Results
The model explains a bit over half the variance in export cargo (R² ≈ 0.57) using just two operational inputs plus date/port — it's a genuinely useful starting signal, not a highly precise forecaster. It correctly identifies port identity and import volume as the biggest drivers, which matches domain intuition. The honest limitation: it under-predicts the big cargo spikes, and four predictors isn't much to work with.