- Research Article
- 10.3390/agronomy15071574
Estimating Soil Cd Contamination in Wheat Farmland Using Hyperspectral Data and Interpretable Stacking Ensemble Learning
- Jun 27, 2025
- Agronomy
- Liang Zhong + 5 more +5
Soil heavy metal pollution threatens agricultural safety and human health, with Cd exceeding standards being the most common problem in contaminated farmland. The development of hyperspectral remote sensing technology has provided a novel methodology of quickly and non-destructively monitoring heavy metal contamination in soil. This study aims to explore the potential of an interpretable Stacking ensemble learning model for the estimation of soil Cd contamination in farmland hyperspectral data. We assume that this method can improve the modeling accuracy. We chose Zhangjiagang City, Jiangsu Province, China, as the study area. We gathered soil samples from wheat fields and analyzed soil spectral data and Cd level in the lab. First, we pre-processed the spectra utilizing fractional-order derivative (FOD) and standard normal variate (SNV) transforms to highlight the spectral features. Second, we applied the competitive adaptive reweighted sampling (CARS) feature selection algorithm to identify the significant wavelengths correlated with soil Cd content. Then, we constructed and compared the estimation accuracy of multiple machine learning models and a Stacking ensemble learning method and utilized the Optuna method for hyperparameter optimization. Ultimately, the SHAP method was used to shed light on the model’s decision-making process. The results show that (1) FOD can further highlight the spectral features, thereby strengthening the correlation between soil Cd content and wavelength; (2) the CARS algorithm extracted 3.4–6.8% of the feature wavelengths from the full spectrum, and most of them were the wavelengths with high correlation with soil Cd; (3) the optimal estimation precision was achieved using the FOD1.5-SNV spectral pre-processing combined with the Stacking model (R2 = 0.77, RMSE = 0.05 mg/kg, RPD = 2.07), and the model effectively quantitatively estimated soil Cd contamination; and (4) SHAP further revealed the contribution of each base model and characteristic wavelengths in the Stacking modeling process. This research confirms the advantages of the interpretable Stacking model in hyperspectral estimation of Cd contamination in farmland wheat soil. Furthermore, it offers a foundational reference for the future implementation of quantitative and non-destructive regional monitoring of heavy metal contamination in farmland soil.
Read more