Document Type : Research Paper
Authors
1 Irrigation and Reclamation Engineering Department, Faculty of Agriculture, University of Tehran, Karaj, Iran.
2 Professor, Department of Renewable Energies and Sustainable Resources Engineering, University of Tehran, Tehran, Iran.
Abstract
Keywords
Main Subjects
Comparison of artificial neural network methods and support vector machine in predicting water quality parameters of Dinachal river, IRAN
EXTENDED ABSTRACT
Rivers play a crucial role as vital sources of drinking water and agricultural irrigation, supporting both human health and the environment. However, the presence of various pollutants from agricultural, industrial, and urban sources can turn these invaluable resources into vulnerable points of contamination. Therefore, accurately predicting water quality is essential for effectively monitoring river ecosystems and ensuring their reliability. Unfortunately, traditional forecasting models often struggle to capture the complex and dynamic nature of water quality changes, characterized by non-linear and non-stationary patterns. Nonetheless, recent advancements in artificial neural networks have revolutionized the field of water quality prediction, sparking new discussions and possibilities in this area.
This study focuses on the evaluation and prediction of qualitative parameters in the Dinachal River, a vital river in the Gilan province. Two models, namely artificial neural network and regression support vector machine, were utilized for predicting nine qualitative parameters including total dissolved solids, electrical conductivity, acidity, Cl, SO4, HCO3, Ca, Mg, and Na. The predictions were made on a monthly basis from the years 2006 to 2, and the performance of the models was assessed using RMSE, MSE, and MAPE statistics.
The artificial neural network was employed to estimate the quality parameters of the Dinachal River. Inspired by biological brain simulation studies, the ANN is a network of interconnected elements capable of identifying similar patterns and predicting time series data. Neural networks have demonstrated their flexibility and applicability in various water resources problems, often outperforming traditional models. For this study, MATLAB 2019a software was employed to develop the neural network. The model was trained using 70% of the data randomly selected, while 15% and 15% were used for validation and testing purposes, respectively.
In the technical literature, support vector machine algorithms are abbreviated as SVC for data classification and SVR for regression applications. Support vectors refer to points with non-zero Lagrange coefficients, and the loss function in SVR is used to evaluate the regression function. The primary objective of SVR is to find the function f(x) that deviates the most from the target data, as obtained from the training data. When the deviation is zero, the best regression is achieved, while larger values indicate lower regression accuracy.
The prediction models SVR and ANN were developed using the SK-Learn Python library and MATLAB software, respectively. These models were utilized to predict nine qualitative parameters (TDS, EC, pH, HCO3, Cl, SO4, Ca, Mg, and Na) based on monthly data from the Dinachal River - Dinachal Station. The performance of each model for each parameter was then compared using evaluation indices such as RMSE, MSE, and MAPE.
To predict each parameter, eight other parameters were used as inputs for the models, with the desired parameter being treated as the objective function. For instance, when predicting the TDS parameter, inputs such as EC, pH, HCO3, Cl, SO4, calcium, magnesium, and sodium ions were considered during model training. In both the ANN and SVR models, 70% of the data was allocated for training the models, while the remaining 30% was randomly selected for validation and testing purposes.
Based on the results obtained, the SVR model demonstrated superior performance in predicting total dissolved solids (with an RMSE of 2.03) and magnesium concentration (with an RMSE of 0.062) compared to the artificial neural network model. Conversely, the artificial neural network model exhibited relatively better success in predicting the remaining parameters. Nevertheless, both models were deemed suitable for predicting the quality parameters of the Dinachal River.
Furthermore, the SVR model achieved the best performance in predicting total dissolved solids and electrical conductivity with a MAPE coefficient of 0.007, while the artificial neural network model achieved a MAPE coefficient of 0.001 for the same parameters. It is worth mentioning that both models showed weaker performance in predicting the chlorine parameter, despite having RMSE values of 0.055 and 0.052 for SVR and ANN models, respectively.
The methods employed in this study have proven effective in predicting the water quality of the Dinachal River overall. However, it is recommended that future studies investigate the reasons behind the lower accuracy of the artificial neural network and support vector machine models in predicting the chlorine parameter, and propose appropriate solutions. Additionally, exploring the performance of more advanced models based on deep learning for predicting quality parameters could be a valuable avenue for further research.