Daily Climate Time Series — Delhi Temperature Forecasting
Gaussian Processes, gradient boosting, and a univariate ARIMA benchmark for Delhi daily mean temperature — with covariates where applicable, and an explicit discussion of what is actually comparable.
Project Overview
This project focuses on forecasting the daily mean temperature in Delhi using four years of historical climate records (2013–2017). The dataset provides daily measurements of mean temperature, humidity, wind speed, and atmospheric pressure.
The goal was to design and compare several regression pipelines capable of capturing the strong seasonal structure of the data while leveraging meteorological covariates to improve residual accuracy. The primary evaluation metric is Root Mean Squared Error (RMSE) on a held-out test set. Not every model answers the same forecasting question; the sections below separate the covariate-based models from a rolling one-step ARIMA baseline.
Dataset
The Daily Delhi Climate dataset contains daily observations collected from 2013 to 2017. The target variable is meantemp (°C), and the available features are:
- humidity — daily mean relative humidity (%)
- wind_speed — daily mean wind speed (km/h)
- meanpressure — daily mean atmospheric pressure (hPa)
- date — converted to a numeric day index to encode temporal structure
The dataset contains no missing values. However, meanpressure exhibits extreme outliers (values reaching 7 679 hPa against a typical range around 1 011–1 014 hPa). These were handled by clipping at empirical 1% and 99% quantiles.
Technical Approach
1. Preprocessing & Feature Engineering
- Outlier clipping on
meanpressureusing quantile thresholds, which significantly improved its correlation with the target. - Standard scaling of continuous features before model training.
- Fourier features — sine and cosine terms at multiple periods (up to 2 years) to explicitly encode seasonality.
2. Gaussian Process Regression (GPR)
The first family of models leverages Gaussian Processes with carefully engineered kernels:
- Additive decomposition — T(t, w, p, h) = f(t) + g(w, p, h): a temporal GP captures seasonal trends, and a second GP models residuals using the meteorological covariates.
- The temporal component uses an ExpSineSquared kernel (periodicity fixed to 365 days) combined with a RationalQuadratic kernel for medium-range irregularities, plus a WhiteKernel for noise.
- GPR provides not only point predictions but also calibrated 95% confidence intervals, giving a direct measure of predictive uncertainty.
3. Fourier Regression + XGBoost
The second family combines a linear Fourier regression with gradient boosting:
- A linear regression on Fourier features captures the main seasonal trend.
- An XGBoost model with hyperparameter tuning via
RandomizedSearchCVand time-series cross-validation (TimeSeriesSplit, 5 folds) fits the residuals. - Hyperparameters searched: number of estimators, learning rate, max depth, min child weight, subsample ratio.
4. Fourier Regression + Gaussian Process on Residuals
A hybrid variant replaces XGBoost with a GP on the residuals of the Fourier regression, using an RBF kernel combination. Among the covariate-based pipelines, it achieves the lowest RMSE, but it exhibits a high normalised prediction error: the uncertainty estimates are poorly calibrated.
5. ARIMA on the temperature series alone
A classical univariate benchmark: ARIMA is fitted only on the temperature series (no humidity, wind, or pressure).
- Preprocessing — deseasonalization and detrending before order selection.
- Order selection — ACF and PACF guidance, with AIC for the final choice of orders.
- Forecasting protocol — rolling one-step-ahead forecasts on the test segment (each new prediction can use the observed history up to that date).
Key Results
RMSE values are summarised here for a quick overview; the section What is actually comparable? explains how to interpret the ARIMA figure next to the long-horizon models.
Best covariate model
Fourier regression + GP on residuals — lowest error among long-horizon models using meteorological covariates
Fourier + XGBoost
Residual boosting after Fourier trend — fast and nearly as accurate as the Fourier + GP hybrid
Lowest headline RMSE
ARIMA on temperature only — rolling one-step-ahead; not the same task as the long-horizon models (see below)
Additive GPR
Time + covariates in one GP structure — best calibrated uncertainty among GPs
Model Comparison
| Model | Test RMSE (°C) | Uncertainty Estimates | Training Cost |
|---|---|---|---|
| Additive GP (time + covariates) | 2.83 | Yes — calibrated | High |
| Fourier + GP (residuals) | 2.65 | Yes — overconfident | High |
| XGBoost on Fourier features | 2.67 | No | Low |
| ARIMA (temperature only, rolling 1-step) | 1.65 | Yes (forecast intervals) | Low (~40 s) |
What is actually comparable?
Placing every RMSE in the same table is convenient, but it can be misleading. The covariate-based models (Fourier + XGBoost, Fourier + GP, additive GPR) map a given day’s inputs to a prediction for that same day on the test set — a fixed long-horizon regression task with exogenous meteorological features. The ARIMA benchmark is different: it forecasts the next day’s temperature from the univariate series alone, in a rolling one-step-ahead setup. At each test date, the model has access to the entire observed history up to the previous day, so it refits or updates its state with information that arrives successively along the horizon. That extra temporal leverage partly explains the lower RMSE; it does not mean ARIMA “solves the same problem” more accurately than Fourier + GP.
It would be somewhat dishonest to crown a single “winner” without stating this. For a fair comparison of approaches that use humidity, wind, and pressure as inputs, the strongest long-horizon model remains Fourier regression + Gaussian Process on the residuals (RMSE 2.65 °C). The ARIMA result is best read as a complementary baseline — valuable, but not interchangeable with the covariate pipelines above.
Key Takeaways
- Proper preprocessing matters: clipping pressure outliers visibly improved its correlation with the target temperature and benefited downstream models.
- Fourier features are a powerful baseline for data with well-defined seasonality: encoding the 365-day period as sine/cosine terms substantially reduces the task for the residual model.
- XGBoost vs. Gaussian Processes: despite initial expectations, XGBoost with Fourier augmentation matches the accuracy of GP-based approaches at a fraction of the computational cost.
- Uncertainty quantification: GPs remain attractive when calibrated confidence intervals are needed. However, residual GP models can be overconfident — the high normalised prediction error signals that the model underestimates its own errors.
- ARIMA as a baseline: the univariate ARIMA run achieves a very low rolling one-step RMSE because it uses the temperature history sequentially; it is not a drop-in substitute for the long-horizon models (see What is actually comparable? above).
- Future work: incorporate exogenous variables into a time-series formulation (e.g. ARIMAX), explore longer horizons, and compare against recurrent models such as LSTM for multi-step forecasts.