A framework for auditing data leakage and predictor timing in machine learning forecasts of maximumtemperature in Lahore and Karachi
Reported machine learning accuracies for daily maximum temperature are hard to compare because the prediction task is rarely stated. We use 16 years of ERA5 reanalysis for Lahore, Pakistan, so the target is modelled rather than station-observed. We audit three routes by which target information reaches the predictors. Mean temperature, derived from the same hourly series, reduces error by 33% when included. Rolling windows spanning the current day include the target itself. Same-day exogenous predictors matter most, because they turn forecasting into diagnostic estimation. One pipeline is therefore run with same-day predictors (Setting A) and with only information available before the target day (Setting B). Setting A reaches R 2 = 0.980; Setting B reaches 0.954, improving on persistence by 11.8%. In Setting B the stacking ensemble is statistically equivalent to each gradient-boosted model within a pre-set margin. Four deep sequence architectures, trained with five seeds each for Lahore in Setting B, do not improve on them. The gap between settings held across rolling origins and under equal tuning. Feature attributions shift from same-day thermodynamic state in Setting A to persistence and seasonality in Setting B. The same pipeline gives 8.0% skill for Karachi, so attainable skill depends on climate.
Authors
- Ahmad Mahmood Qureshi
- Farheen Ibraheem (ORCID: https://orcid.org/0000-0001-5107-6310)
- Alizay Nasir (ORCID: https://orcid.org/0009-0006-1698-2741)
Institutions
- Forman Christian College (PK)
Publication Details
- Journal
- Scientific Reports
- Published
- 2026-11-30
- DOI
- https://doi.org/10.1038/s41598-026-78458-6
- Primary Topic
- Meteorological Phenomena and Simulations
- Type
- article
- Field-Weighted Citation Impact
- 0.00