Abstract
Relative humidity is a crucial indicator of the amount of water vapor in the air. Expressed as a percentage of the amount needed to reach saturation at a given temperature and pressure. Prediction of relative humidity levels allows us to adapt to our environment and avoid the negative impact of this indicator on our daily lives. Hence the interest in using innovative methods based on artificial intelligence instead of the current less efficient statistical methods, such as multiple linear regression, ... The objective of this study is to create a high-performing model using artificial neural networks of the Multilayer Perceptron (MLP) type, while optimizing database distribution, hidden layer quantity, and node number with the Levenberg-Marquardt learning algorithm. The model aims to predict relative humidity levels in Tangier city. The study utilized a meteorological database with daily readings of nine variables, consisting of eight factors: temperature, shortwave radiation, direct shortwave radiation, total cloud cover, total precipitation, evapotranspiration, vapor pressure deficit, and wind speed, to forecast the output, which is the definition of relative humidity. The values in this database were recorded between January 1985 and December 2022 (13869 days). The efficacy of the developed models was evaluated by computing and contrasting performance metrics, including the correlation coefficient and root mean square error. The study findings demonstrate that the optimal MLP model for forecasting relative humidity in Tangier includes an [8–13–1] architecture utilizing the "Tansig" function in the hidden layer and the "Purelin" function in the output layer. For this optimized model, the correlation coefficient and mean squared error have respective values of R = 0.984 and 2.60 × 10− 3. This MLP model is deemed to be more efficient than the models established by multiple linear regressions (with an R value less than 0.86 and MSE greater than 10.09). These results could have practical applications for better understanding and adapting to climate variations in this region.