A comparison of decision tree-based algorithms for food discrimination using vibrational spectroscopy
Leandro P da Silva1, Micael D L Oliveira1, Javier E L Villa1
1Institute of Chemistry, University of Campinas (UNICAMP), Campinas 13081-970, SP, Brazil.
Abstract:
In this work, we systematically studied decision tree-based algorithms-decision tree, random forest, and XGBoost-for binary food discrimination. Using near-infrared (NIR) and Raman spectroscopy, accuracy values of up to 99 % were achieved for discriminating (1) gluten-containing and gluten-free bread and (2) pure and sucrose-adulterated coconut water, respectively. Moreover, NIR bands of water (OH bonds), protein content (CH and NH bonds), and Raman bands attributed to C-O-C bonds in the glycosidic structure were identified as the most important. In addition to traditional feature importance estimates, a strategy based on impurity reduction was proposed to improve chemical interpretability. The figure of merit and splitting method selected for optimizing the algorithms were also evaluated. Although random forest required a higher computational cost than decision tree and partial least squares discriminant analysis, it outperformed both in accuracy. It also provided more robust and chemically meaningful results than XGBoost.


