Prediction of copper contamination in soil across EU using spectroscopy and machine learning: Handling class imbalance problem - Chongchong Qi; Nana Zhou; Tao Hu; Mengting Wu; Qiusong Chen; Han Wang; Kejing Zhang; Zhang Lin (Smart Agricultural Technology)
Soil copper (Cu) pollution is a significant global environmental challenge, necessitating accurate assessment methods for effective control. However, existing classification approaches for Cu content in soil spectral datasets often face imbalances in data distribution, resulting in unreliable identification of Cu-contaminated samples. To address this limitation, we conducted a comprehensive evaluation of three basic machine learning (ML) algorithms and four imbalanced ML algorithms. These methods were used to develop seven continental-scale models for imbalanced classification of soil Cu contamination using visible and near-infrared reflectance spectroscopy. A dataset comprising 18,675 topsoil samples was utilized for training and validation. Hyperparameter optimization was applied to enhance model performance, and multiple statistical metrics were employed for evaluation. Furthermore, feature importance analysis identified key spectral bands influencing Cu classification. Among the tested models, the BalancedRandomForest algorithm demonstrated superior classification performance and generalization ability, achieving an area under the curve of 0.870, recall of 0.816, and balanced accuracy of 0.793. Spectral analysis highlighted the 2310–2320 nm as the most critical spectral region for Cu classification. This study underscores the utility of the optimized model for managing soil Cu pollution and provides a valuable reference for addressing imbalanced learning challenges in soil pollution research.