Machine Learning-Based Simulation of Monthly Water Quality in the Santa Lucía Chico River Basin
摘要
This study aims to develop a data-driven tool for monthly water quality simulation using machine learning techniques. The study focuses on the upper basin of the Santa Lucía Chico River in Uruguay, utilizing data from two water quality monitoring stations (XSLH010 and XSLH020). The variables considered include dissolved oxygen (DO), temperature (T), total nitrogen (NT), and phosphate (PO43⁻). The time series data were split into training (80%) and testing (20%) sets, with separate min–max normalization applied to ensure consistent scaling across variables. The prediction models were trained using Extra Trees Regressor (ET) and Histogram-based Gradient Boosting Regressor (HGB), evaluated with Mean Absolute Error (MAE) and Mean Squared Error (MSE). This resulted in four models trained per variable. Nash–Sutcliffe Efficiency (NSE) was also calculated for model performance evaluation. Optimal hyperparameters were identified using a fivefold cross-validation process and optimized with Optuna. The input dataset integrates domain knowledge by incorporating spatial dependencies, spatial correlations, physical dependencies, and temporal variability. Additionally, SHapley Additive exPlanations (SHAP) values were used to refine model inputs by removing low-importance variables. The models operate at a monthly time step, allowing for the assessment of long-term water quality trends. The results were highly satisfactory, with NSE values exceeding 0.6 for all variables across both stations, except for PO43⁻ at XSLH010. These findings demonstrate the potential of machine learning models for water quality prediction and provide a valuable tool for improving water resource management. Future efforts will focus on refining the model, incorporating additional data sources, and extending its applicability to other basins.