Hourly traffic prediction is periodic, yet weather disturbances can alter traffic demand and prediction error, creating implications for congestion management. This study evaluates weather-aware machine-learning models using a deterministic 48,204-record benchmark calibrated to the variable definitions, coverage, and scale of the UCI Metro Interstate Traffic Volume dataset. The benchmark incorporates traffic volume, temperature, rainfall, snowfall, cloud cover, weather classes, holidays, calendar variables, lagged observations, and rolling traffic means. Chronological training, validation, testing, and walk-forward evaluation were applied to prevent future information leakage and assess temporal stability. Ridge regression, Random Forest, Extra Trees, Gradient Boosting, HistGradientBoosting, and a 24-hour persistence baseline were compared using RMSE, MAE, R², and sMAPE. HistGradientBoosting achieved the lowest test error, with RMSE of 364.34 vehicles/hour, MAE of 287.64 vehicles/hour, and R² of 0.949. Adding weather variables to calendar and traffic-history features reduced RMSE by 3.39%. Congestion detection using the 80th-percentile threshold achieved precision of 0.898, recall of 0.807, and F1 of 0.850. Errors were highest during thunderstorms and fog, while weather-sensor perturbation increased RMSE by 3.93%. The findings indicate that weather provides incremental contextual information, whereas temporal structure and recent traffic state remain dominant predictors. The calibrated reconstruction requires validation against original source records before deployment.
Copyrights © 2026