Portable NIR spectroscopy and machine learning for quantifying formaldehyde adulteration in buffalo milk
摘要
This study uses portable spectroscopy, spectral preprocessing, principal component analysis (PCA), and machine learning (ML) to detect and quantify formaldehyde adulteration in buffalo milk. A calibration dataset was created by spiking milk samples with varying concentrations of formaldehyde (0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 10.0, 20.0, 30.0, 40.0, and 50.0%) to simulate varying levels of adulteration. Spectral data were acquired in the near-infrared (NIR) range (900–1700 nm) using a portable spectrophotometer. Model performance was assessed using two concentration ranges: a low-level adulteration subset (0–10%) to mimic realistic adulteration scenarios, and the entire dataset (0–50%) to evaluate performance across a broader range. The regression model had coefficient of determination (R2) values of 0.922–0.998, RMSE of 0.745 − 0.724, and RPD of 3.582–20.490 for 0–10% and 0–50% ranges, respectively, suggesting good to exceptional predictive performance. In classification, the 10-fold cross-validated Matthews correlation coefficient (MCC) ranged from 0.845 ± 0.050 (0–10%) to 0.922 ± 0.019 (0–50%), indicating robust, stable performance. These findings suggest the use of portable NIR spectroscopy in conjunction with machine learning for quick, non-destructive identification of formaldehyde in milk.