Abstract:
This work uses UV-Vis-NIR spectroscopy (200-1700 nm), spectral preprocessing, principal component analysis (PCA), and machine learning (ML) to identify and quantify formalin adulteration in cow and buffalo milk. Formalin was added to milk at various concentrations with increments of 0.5 percent, 1.0 percent, and up to 50.0 percent. The analysis was carried out under three scenarios: cow, buffalo, and a combination. The spectral datasets were separated into training, validation, and test sets. Regression modeling yielded coefficients of determination (R sup(2)) of 0.998-0.999, root mean squared errors (RMSE) of 0.16-0.80, and RPD values of 80.13-182.79. Leave-one-out cross-validation (LOOCV) was obtained (R sup(2) = 0.999, RMSE ranged from 0.24 to 0.476). The classification accuracy varied from 73.0 percent to 100.0 percent, with 5-fold cross-validation average accuracies of 92.9 percent, 90.0 percent, and 82.2 percent for Scenarios I, II, and III, respectively. This outcome indicates the possibility of a practical, real-time, and non-destructive milk quality assessment system.