Purpose The Lupinus germplasm includes sweet and bitter materials distinguished by compounds responsible for bitterness. Conventional identification is often destructive. This study assesses a non-destructive approach based on visible–near infrared (VIS-NIR) spectroscopy and machine learning to classify whole seeds from seven Lupinus species into sweet or bitter classes. Methods Five machine-learning algorithms were evaluated on two datasets (reflectance and absorbance) acquired with VIS-NIR spectroscopy. Analyses were conducted on raw spectra and on spectra transformed using four spectral-transformation techniques. Because classes were imbalanced, five resampling methods were compared to improve classification performance. Results Performance was assessed using F1-score and ROC-AUC . On reflectance, LGR and SVC reached 92.5 and 92.0%; on absorbance, SVC and RF achieved 93.2 and 92.5%. Hybrid transformations consistently improved discrimination, and resampling reduced overfitting associated with class imbalance. Conclusion The results indicate that combining VIS–NIR spectroscopy with machine learning provides a suitable non-destructive alternative to discriminate sweet and bitter Lupinus materials/ecotypes.
Díaz-Álvarez et al. (Fri,) studied this question.