Foods (Sep 2024)

Comparative Analysis of XGB, CNN, and ResNet Models for Predicting Moisture Content in <i>Porphyra yezoensis</i> Using Near-Infrared Spectroscopy

  • Wenwen Zhang,
  • Mingxuan Pan,
  • Peng Wang,
  • Jiao Xue,
  • Xinghu Zhou,
  • Wenke Sun,
  • Yadong Hu,
  • Zhaopeng Shen

DOI
https://doi.org/10.3390/foods13193023
Journal volume & issue
Vol. 13, no. 19
p. 3023

Abstract

Read online

This study explored the performance and reliability of three predictive models—extreme gradient boosting (XGB), convolutional neural network (CNN), and residual neural network (ResNet)—for determining the moisture content in Porphyra yezoensis using near-infrared (NIR) spectroscopy. We meticulously selected 380 samples from various sources to ensure a comprehensive dataset, which was then divided into training (300 samples) and test sets (80 samples). The models were evaluated based on prediction accuracy and stability, employing genetic algorithms (GA) and partial least squares (PLS) for wavelength selection to enhance the interpretability of feature extraction outcomes. The results demonstrated that the XGB model excelled with a determination coefficient (R2) of 0.979, a root mean square error of prediction (RMSEP) of 0.004, and a high ratio of performance to deviation (RPD) of 4.849, outperforming both CNN and ResNet models. A Gaussian process regression (GPR) was employed for uncertainty assessment, reinforcing the reliability of our models. Considering the XGB model’s high accuracy and stability, its implementation in industrial settings for quality assurance is recommended, particularly in the food industry where rapid and non-destructive moisture content analysis is essential. This approach facilitates a more efficient process for determining moisture content, thereby enhancing product quality and safety.

Keywords