Enhanced prediction of total flavonoid in chrysanthemum using hyperspectral imaging and XGBoost-SHAP powered by WGAN data augmentation
Mengmeng Li, Linna Guo, Yujie Wang
Abstract
Chrysanthemum is one of the most cultivated herbal plants in China and is widely recognized for its potential health-promoting properties, many of which are attributed to its abundant flavonoid compounds. Traditionally, the determination of flavonoid content in chrysanthemum relies on labor-intensive wet chemical methods, while rapid, green, and non-destructive analytical alternatives remain a challenging. Herein, hyperspectral imaging combined with interpretable machine learning was employed for the quantitative prediction of total flavonoid. To address the limitations imposed by small sample sizes on model robustness, a Wasserstein generative adversarial network (WGAN) was introduced to simultaneously generate synthetic spectral and chemical data. Multidimensional evaluation metrics confirmed the effectiveness of WGAN in data augmentation, demonstrating superior data quality compared to conventional GAN and the deep convolutional GAN (DCGAN). The generated data closely resembling real data were obtained and validated through comprehensive qualitative and quantitative assessments. Leveraging the augmented dataset, an interpretable extreme gradient boosting - shapley additive explanations (XGBoost-SHAP) model achieved accurate prediction of total flavonoid content in chrysanthemum samples, yielding an R² of 0.8714 and a ratio of prediction to deviation (RPD) of 3.26, outperforming models trained solely on real data. The SHAP values further elucidated the contributions of characteristic wavelengths to model outputs, enhancing the transparency and interpretability of the predictive framework. This study thus presents a practical and scalable strategy for compositional prediction of agricultural products under data-constrained conditions, offering meaningful insights into the interpretability of machine learning-based spectroscopic modeling. • Hyperspectral imaging was used to predict total flavonoid in chrysanthemum. • WGAN was the optimal choice for data augmentation with 8000 training epochs. • XGBoost-SHAP model provides interpretable and accurate prediction. • The accuracies of all models were improved by the generated spectral data.