Featured Project — Forecasting
Lahore Smog Forecast
A machine-learning forecaster for Lahore’s air quality index (AQI), built to give residents and planners a data-driven short-term outlook during smog season.
The Problem
Every winter, Lahore ranks among the most polluted cities on Earth. Schools close, hospitals fill, and daily life is disrupted — yet most people only learn how bad the air is after it is already bad. A reliable short-horizon AQI forecast turns reaction into preparation.
What I Built
- A gradient-boosting regression model trained on historical AQI series with calendar and lag features that capture weekly and seasonal smog patterns.
- An honest benchmark: the model is compared against a seasonal-naive baseline (last week’s values), the standard a forecaster must beat to be worth anything.
- A public dashboard presenting the forecast in plain form.
Technical Approach
- Features: lagged AQI (24h, 48h, 7d), rolling means, day-of-week and month encodings for seasonality.
- Model: gradient-boosted trees, tuned for MAE — the metric that matters for an index people plan around.
- Validation: time-ordered splits only; no random shuffling, so the test scores reflect real forecasting conditions.
Technologies & Stack
Results
27% lower mean absolute error than the seasonal-naive baseline on held-out time periods — a real, measured improvement, not a cherry-picked one.
Limitations
Forecasts degrade during abrupt events — sudden rain, wind shifts or emission spikes — and depend on the upstream AQI feed staying available and accurate.