The question: can a simple model forecast tomorrow's weather in Lagos better than the obvious rules, "tomorrow will be like today" or "the usual for this time of year"?
What I built: next-day forecasts for maximum temperature, minimum temperature and the chance of rain, using almost 5 years of daily data and tested on a year the models never saw.
Results on 2026
Average error in °C for next-day temperature, January to October 2026.
| Model | Next-day max | Next-day min |
|---|---|---|
| Persistence (tomorrow = today) | 0.70 °C | 0.72 °C |
| Climatology (day-of-year average) | 0.81 °C | 0.87 °C |
| Ridge regression | 0.59 °C | 0.59 °C |
For rain (1 mm or more), the chosen model lowers the Brier score from 0.189 for the seasonal average to 0.163, and raises AUC from 0.78 to 0.82. Gradient boosting did worse than the simpler models: three years of daily data isn't enough for it.
Forecast made the day before vs actual maximum temperature, 2026.
How I kept it honest
- Features use only what is known by the end of today: today's readings, recent days, weekly averages and the time of year.
- Time-based split: train on 2022 to 2024, choose the model on 2025, test once on 2026.
- Every model is compared with persistence and climatology baselines.
A correction I made: my first version reported R² of 0.98. It used the same day's readings, including the day's temperature range, which contains the answer, and a random split. This version forecasts the next day from past data only and tests on a later year.
Data: Open-Meteo historical archive (ERA5-based reanalysis) for central Lagos. It records light drizzle as rain more often than a rain gauge would.