To assess and predict the Nansi Lake soil pollution risk, we evaluate the soil environmental quality in the Nansi Lake region using machine learning techniques, combined with the SHapley Additive exPlanations (SHAP) model for interpretability. The primary objective was to predict the level of soil pollution caused by heavy metals, incorporating the traditional Pollution Load Index (PLI) and Potential Ecological Risk Index (PERI) methods. Through the integration of statistical characteristics, PLI, and PERI evaluations, a new assessment method was created, categorizing soil pollution into “Class0—no risk”, “Class1—low risk”, and “Class2—high risk”. Various machine learning models, including Support Vector Machine (SVM), Decision Tree Classifier (DT), Random Forest (RF), and XGBoost, were employed to predict the soil quality based on these indices. XGBoost demonstrated the highest accuracy, achieving a prediction accuracy of 93%. SHAP analysis was further applied to explain the machine learning model and determined that the accumulation of key pollutants such as cadmium (Cd) and mercury (Hg) may significantly produce soil pollution risk, and targeted management needs to be developed for these pollution features.
To identify the sources and driving mechanisms of nitrate contamination in pore water around Nansi Lake, 54 pore water samples were analyzed via hydrogeochemical analysis, Gibbs diagrams, ionic ratios, and principal component analysis (PCA). The pore water is predominantly slightly alkaline, with dominant cations Ca2+ and Na+, and anions HCO3− and SO42−. Nitrate-nitrogen (NO3−-N) concentrations range from 0.82 to 54.31 mg·L−1, with a coefficient of variation of 1.41 and an exceedance rate of 18.52%, indicating significant external inputs. A positive correlation between NO2− and NO3− suggests denitrification in some areas. Nitrate concentrations exhibit distinct spatial heterogeneity: high concentrations occur in agricultural/aquaculture lakeside plains and urban areas, low concentrations near coal mining subsidence zones, and transitional zones showing outward diffusion. Nitrate sources are predominantly anthropogenic. High Cl− and low NO3−/Cl− ratios indicate domestic and aquaculture wastewater infiltration, whereas low Cl− and high NO3−/Cl− ratios indicate agricultural fertilizer input. Industrial and natural sources are minor. PCA identified three controlling factors (cumulative variance 69.81%): coal mining and industrial/domestic pollution (39.82%), carbonate rock weathering (19.44%), and agricultural activities (10.55%). Health risk assessment shows no significant risk for adults (hazard quotient (HQ) < 1), but children face localized risks at nine sites (HQs of 1.25–2.26) in intensive farming, urban, and transitional zones. Excessive fertilizer application and sewage leakage are the primary causes, posing methemoglobinemia risks to infants. This study provides a scientific basis for nitrate pollution control and sustainable water management in the Nansi Lake Basin and offers methodological insights for similar lacustrine plain regions.