Water quality prediction and carbon reduction mechanisms in wastewater treatment in Northwest cities using Random Forest Regression model - Jingjing Sun; Xin Guan; Xiaojun Sun; Xiaojing Cao; Yepei Tan; Jiarong Liao (Scientific Reports)
Abstract With the accelerated urbanization and economic development in Northwest China, the efficiency of urban wastewater treatment and the importance of water quality management have become increasingly significant. This work aims to explore urban wastewater treatment and carbon reduction mechanisms in Northwest China to alleviate water resource pressure. By utilizing online monitoring data from pilot systems, it conducts an in-depth analysis of the impacts of different wastewater treatment processes on water quality parameters. This work pays particular attention to their impact on key indicators such as Chemical Oxygen Demand (COD), NH4 +-N, Total Phosphorus (TP), and Total Nitrogen (TN), and the application of predictive models. The work first establishes a Random Forest Regression (RFR) model. The RFR algorithm integrates Bagging ensemble learning and random subspace theory to construct multiple decision trees and aggregate their predictions, thereby enhancing the model’s prediction accuracy and stability. Using bootstrap sampling, the RFR model generates multiple training subsets from the original data and randomly selects subsets of variables to construct regression trees. Its performance in predicting various water quality indicators is then evaluated. The results show that the RFR model exhibits excellent performance, achieving high levels of prediction accuracy and stability for all indicators. For example, the R2 for COD prediction is 0.99954, while the R2 values for NH4 +-N, TP, and TN predictions reach 0.99989. Compared to five other models, the RFR model demonstrates the best performance across all water quality indicator predictions. This work provides critical support for optimizing wastewater treatment technologies and developing water resource management policies. These findings also offer essential theoretical and empirical insights for the future improvement of urban wastewater treatment technologies and water resource management decision-making.