Machine learning to predict groundwater quality
XIAO Yi;GUO Yahui;LI Mingwei;FU Yongshuo;SUN Feng;College of Water Sciences,Beijing Normal University;Information Center(Hydrology Monitor and Forecast Center),Ministry of Water Resources;
Groundwater quality data( pH, total hardness, total dissolved solids, sulfate, chloride, iron and manganese) and meteorological data(average temperature,minimum temperature,maximum temperature,average minimum temperature,average maximum temperature,daily(20:00-20:00) precipitation,daily precipitation ≥ 0.1mm days, maximum daily precipitation) were subject to analysis by machine learning models, using BP neural network,random forest and support vector mechanism. For each groundwater quality parameter,different machine learning algorithms were used to simulate data in different lag phases, results were then compared with measured groundwater quality parameters. Machine learning model with highest accuracy and corresponding lag phase were selected as the optimal model. Different machine learning methods and choice of lag phase were found to have great influence on prediction accuracy. BP neural network showed the highest prediction accuracy for pH(R~2 = 0.225,RMSE is 2.411), total hardness( R~2 = 0.503, RMSE is 47.973 mg·L~(-1)), chloride( R~2 = 0.994, RMSE is 0.544mg·L~(-1)) and iron(R~2 = 0.302,RMSE is 7.772 mg·L~(-1)). RF showed the highest prediction accuracy for sulfate(R~2 = 0.908,RMSE is 3.788 mg·L~(-1)) and Manganese(R~2 = 0.522,RMSE is 0.429 mg·L~(-1)). All methods used showed good predictive performance for total dissolved solids( R~2 = 0.994-0.996, RMSE is 674.660-950.470mg·L~(-1)). The best lag phase of sulfate and Manganese monitoring model was 0 month,the best lag phase of chloride monitoring model was 1 month,the best lag phase of pH,dissolved total solids and total hardness monitoring model was 2 months.