Vegetable oils contain traces of heavy metals that can cause irreversible damage to human health. The present study employed near-infrared spectroscopy and variable selection in conjunction with partial least squares (PLS) for the rapid determination of Cd content in peanut oil. Firstly, the spectral data of peanut oil test samples were preprocessed by different preprocessing methods, and the best preprocessing method was selected according to the results obtained by the PLS regression model. Then, PLS regression models were established to determine Cd content in peanut oil by variable iterative space shrinkage approach (VISSA), competitive adaptive reweighted sampling (CARS), multiple feature spaces ensemble strategy with least absolute shrinkage and selection operator (MFE-LASSO), and bootstrap soft shrinkage (BOSS), respectively. The results show that all four feature optimization algorithms could improve the prediction accuracy of the model. Among them, the CARS-PLS model had high prediction accuracy. Its prediction coefficient of determination (R2P) was 0.9666, the root mean square error of prediction (RMSEP) was 2.8207 mg/kg, and the relative prediction deviation (RPD) was 5.4705, respectively. In summary, near-infrared spectroscopy combined with chemometrics could be used for rapid quantitative detection of Cd in peanut oil.
Soil, one of the most precious natural resources on Earth, gradually accumulates heavy metals, inevitably causing significant damage to the ecological environment. Here, we introduce confocal controlled laser induced breakdown spectroscopy (CCLIBS) technology for the quantitative analysis of the heavy metal cadmium in soil for the first time. CCLIBS offers better spatial consistency and stable plasma temperature during sample ablation compared to traditional LIBS, thereby reducing matrix effects to improve the accuracy of the quantitative results. The fluctuation of the spectrum and limit of detection are reduced by 0.6 times and 0.39 times, respectively. An effective prediction model was established using the partial least squares method, with a determination coefficient increased to 0.96. The root mean square error of prediction and average relative error are reduced to 67.67 and 0.20, respectively. These results indicate that CCLIBS provides consistent ablation conditions for elemental quantification and yields reliable test results, which is significant for monitoring heavy metals in the ecological environment and effectively intervene and mitigate environmental contamination.