A Comprehensive Comparative Analysis of Machine Learning Algorithms for Daily Temperature Prediction in Lisbon, Portugal (1990–2024)

Read the full article See related articles

Discuss this preprint

Start a discussion What are Sciety discussions?

Listed in

This article is not in any list yet, why not save it to one of your lists.
Log in to save this article

Abstract

Reliable daily temperature prediction is a critical component of climate risk assessment, agricultural planning, renewable energy optimization, public health preparedness, and urban resilience strategies. Traditional numerical weather prediction (NWP) systems, while physically grounded, often face limitations related to spatial resolution, computational cost, and systematic bias, particularly at local and urban scales. In recent years, machine learning (ML) has emerged as a powerful complementary approach capable of modeling complex nonlinear relationships in atmospheric data. This paper presents a comprehensive comparative analysis of nine widely used machine learning regression algorithms for predicting daily mean temperature in Lisbon, Portugal, using a high-resolution, multi-decadal meteorological dataset spanning 1990–2024. The evaluated models include Linear Regression, Ridge Regression, Lasso Regression, K-Nearest Neighbors (KNN), Decision Tree Regression, Random Forest Regression, Gradient Boosting Regression, Support Vector Regression (SVR), and a Multi-Layer Perceptron (MLP) Neural Network. A robust feature engineering framework incorporating radiative, thermodynamic, hydrometeorological, and wind-related variables, along with cyclic temporal encoding, is employed. Model performance is assessed using Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and the coefficient of determination (R²). Results demonstrate that nonlinear and ensemble-based models substantially outperform linear baselines, with the MLP Neural Network achieving the highest accuracy (R² = 0.9967, MAE = 0.153°C). The findings highlight the suitability of advanced ML techniques for temperature forecasting in Mediterranean coastal climates and provide insights relevant to climate adaptation and operational forecasting applications.

Article activity feed