Next Article in Journal
LC-MS/MS for Simultaneous Determination and Isomer Separation of 12 Glucocorticoid Residues in Multiple Aquatic Foods
Previous Article in Journal
Contribution of Protein, Starch, and Fiber Composition to the Prediction of Dough Rheology and Baking Quality in U.S. Hard Red Spring Wheat
Previous Article in Special Issue
Impacts of Roasting Intensity and Cultivar on Date Seed Beverage Quality Traits and Volatile Compounds Using Digital Technologies
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Machine Learning Modeling for Codonopsis Radix Quality Assessment Integrating Efficacy, Chemical Composition, and Macroscopic Traits

1
College of Traditional Chinese Medicine, Beijing University of Chinese Medicine, Beijing 102401, China
2
College of Traditional Chinese Medicine, Shanxi University of Chinese Medicine, Jinzhong 030602, China
*
Authors to whom correspondence should be addressed.
Foods 2026, 15(4), 651; https://doi.org/10.3390/foods15040651
Submission received: 22 January 2026 / Revised: 6 February 2026 / Accepted: 9 February 2026 / Published: 11 February 2026

Abstract

This study aimed to develop an intelligent quality assessment system for Codonopsis Radix based on machine learning modeling. First, Codonopsis Radix samples from six origins were grouped based on pharmacological and chemical indicators, integrating pharmacodynamic evaluations using impaired spleen and lung function animal models with compositional analysis of the alcohol-soluble extract and polysaccharide contents. Subsequently, an electronic nose was employed to objectively quantify their odor profiles. A machine learning-based modeling framework was constructed by integrating feature extraction, feature selection, and pattern recognition techniques. The classification model built by combining electronic nose data with machine learning algorithms demonstrated highly effective discriminatory capability in cross-validation. SHapley Additive exPlanations analysis identified sensors S8, S15, S16, and S18 as critical variables for classification. Concurrently, regression models were established to predict the alcohol-soluble extract and polysaccharide contents. Given the limited sample size, feature expansion and data augmentation strategies were applied exclusively to the training set to enhance model robustness. In summary, the proposed interpretable modeling approach, which integrates pharmacological efficacy, chemical composition, and electronic nose data, provides a referential technical pathway for similar studies.

Graphical Abstract

1. Introduction

Codonopsis Radix (CR) is a plant that can be used both as medicine and as food [1]. Its root has effects that include strengthening the spleen and lungs, nourishing the blood, and generating body fluids. Many traditional Chinese patent medicines, such as Sijunzi Granules and Bufei Pills, use CR as the principal herb [2,3]. Owing to its relatively mild properties, CR holds significant promise for application in functional foods [4,5]. Additionally, it can be processed into medicinal wines or formulated into functional beverages, offering a blend of appealing flavors and health benefits. Currently, nearly all CR available on the market is cultivated, with cultivation occurring across many regions of China [6,7]. This raises the following questions: Do environmental factors such as temperature, humidity, and soil quality impact CR’s quality? Can objective descriptive traits be used to evaluate its quality?
Modern pharmacological experiments can simulate, to a certain extent, the complex therapeutic processes of traditional Chinese medicine (TCM) within the human body. Combined with chemical component content analysis, these experiments form a comprehensive system for assessing TCM quality [8]. In TCM, CR is clinically used to treat functional deficiencies of the spleen and lungs. Spleen deficiency often results from improper diet, overexertion, or emotional disturbances, manifesting symptoms similar to gastric mucosal injury in modern medicine. Lung deficiency is frequently caused by prolonged exposure to adverse environmental factors, often presenting as chronic airway inflammation. Therefore, this study simulates traditional pathogenic factors in Chinese medicine to replicate pathological conditions for evaluating the efficacy of different CR samples. The Chinese Pharmacopoeia (2025 Edition) mainly uses traditional experiential trait identification as the quality standard for CR and stipulates a minimum limit for the content of alcohol-soluble extract. CR polysaccharides have been demonstrated to possess hypoglycemic effects, to enhance digestive capacity, and to treat acute gastric ulcers, making them key therapeutic constituents [9,10]. Additionally, chemical constituents such as Lobetyolin have been demonstrated to possess pharmacological activity, yet they are not included in publicly promulgated standards. Therefore, this study selected the alcohol-soluble extract and polysaccharides, the two key chemical components of CR, to evaluate its quality from the perspective of intrinsic constituents. Electronic nose (E-nose) technology offers advantages such as rapid analysis and no requirement for complex sample pretreatment. It can be used for identifying the variety and origin of samples [11,12], grading [13,14], detecting adulteration [15,16], and providing early warning of deterioration [17,18]. E-nose captures the overall odor fingerprint of an herb’s volatile components through sensors rather than focusing on individual components, which aligns more closely with the holistic perspective of TCM. However, current quality evaluation of CR still predominantly relies on targeted chemical assays or subjective sensory assessment. Therefore, there is a need to develop a rapid method that can integrate multimodal data for holistic quality assessment. Integrating machine learning algorithms to establish classification and regression models enables comprehensive mining of E-nose sensor data, offering the potential for an objective quality evaluation of CR based on measurable characteristics.
Accordingly, this study aimed to develop and validate an integrated evaluation system for CR. We hypothesized that the holistic odor fingerprint captured by E-nose could be correlated with its pharmacological efficacy and key chemical compositions. To test this, we first classified CR samples based on comprehensive pharmacological and chemical assessments. Then, we developed an intelligent machine learning modeling framework to establish predictive models using E-nose data. The ultimate objective was to explore the feasibility of a rapid, non-destructive quality assessment tool based solely on odor analysis.

2. Materials and Methods

2.1. Sample Information

CR samples were collected from six main producing areas: Changzhi City, Shanxi Province (CZ); Dingxi City, Gansu Province (DX); Longnan City, Gansu Province (LN); Aba Prefecture, Sichuan Province (SC); Wushan County, Chongqing Municipality (CQ); and Enshi City, Hubei Province (HB). All samples were harvested during the autumn and winter of 2023. After undergoing processes such as drying and kneading, they were stored at room temperature or in cold storage according to local climate conditions. These samples were commercial products, sourced from the market to represent typical supply conditions. The diameter of CR was measured at 1 cm below the rhizome head, following the method described in the “Standards for the Specifications of 76 Medicinal Materials”. To ensure reliability, each measurement was performed in triplicate, and the average value was calculated as the final result. Based on these measurements, all samples were classified as second-grade. We collected 28 batches of samples, with 3 batches collected from LN, and 5 batches each from the remaining production areas.

2.2. Experimental Materials

A total of 108 male SD rats of clean grade, weighing 180 g–200 g, provided by Spefo (Beijing, China) Biotechnology Co., Ltd., license number SCXK (Jing) 2024-0001. Experimental ethics numbers YSY-DWLL-2025803 and YSY-DWLL-2025802. Medical centrifuge (Model: TGL-16K, Hunan Xiangyi Laboratory Instrument Development Co., Ltd., Changsha, Hunan Province, China). Enzyme-linked immunosorbent assay reader (Model: DNM-9602, Beijing Pulan New Technology Co., Ltd., Beijing, China). Rat Gastrin (GAS) ELISA Kit (Huamei Bioengineering, Wuhan, Hubei Province, China). Rat Motilin (MTL) ELISA Kit LY3367-A (Green Leaf Biotechnology, Suzhou, Jiangsu Province, China). Handheld blood gas analyzer (Model: i-STAT 300-G, Abbott, Chicago, IL, USA). Paraformaldehyde (4%) universal tissue fixative (Beijing Lanjieke Technology Co., Ltd., Beijing, China). Sijunzi Granules (Hubei Kuaihua Pharmaceutical Co., Ltd., Wuhan, Hubei Province, China, Batch No.: 240402). Bufei Pills (Gansu Xifeng Pharmaceutical Co., Ltd., Qingcheng, Gansu Province, China, Batch No.: 2411008). High-speed universal pulverizer (Model: FW-100, Beijing Kewei Yongxing Instrument Co., Ltd., Beijing, China). Electronic balance (Model: AK20002, Chengdu Beisai Instrument Research Institute, Chengdu, Sichuan Province, China). Pharmacopoeia Sieve No. 2. Electric Constant-Temperature Water Bath (Model: HH-S6A, Beijing Kewei Yongxing Instrument Co., Ltd., Beijing, China). CNC Ultrasonic Cleaner (Model: KQ-500DE, Kunshan Ultrasonic Instrument Co., Ltd., Kunshan, Jiangsu Province, China). Twenty-milliliter headspace vials. E-nose (Model: α-Fox 4000, Alpha M.O.S., Toulouse, France), equipped with 18 sensors (S1–S18).

2.3. Pharmacological Evaluation

2.3.1. Spleen-Strengthening Efficacy

Fifty-four SD rats were randomly allocated into nine groups (n = 6): negative control, model, positive control, CZ, DX, LN, SC, CQ, and HB. This grouping strategy was implemented to ensure adequate controls and experimental reproducibility. The rat model of impaired spleen function was established by a 14-day protocol of dietary imbalance (cyclic alternation of 1 day of ad libitum feeding and 2 days of fasting) combined with daily exhaustive swimming in 35–37 °C water. Model success was confirmed by characteristic symptoms, including loose stool, lethargy, lusterless fur, and emaciation, with reference to established literature criteria [19]. CR water extract was prepared by decocting the crude drug twice in water (first with an 8-fold excess of water for 30 min, and then with a 6-fold excess of water for 30 min). The combined filtrates were concentrated to 1 g/mL. Rats were orally administered 1 mL of this solution daily for 14 days. The negative control and model groups received distilled water, while the positive control group received 1 mL of a Sijunzi granules solution (0.8 g/mL).
On day 14 of administration, apparent symptoms—including loose stool, lethargy, lusterless fur, and emaciation—were scored on a scale of 0 (absent) to 3 (severe). Blood samples were drawn from the abdominal aorta. One aliquot was immediately centrifuged at low temperature for assessment of serum MTL levels by ELISA. A separate aliquot was stored at 4 °C overnight, followed by low-temperature centrifugation and ELISA measurement of serum GAS levels.

2.3.2. Lung-Strengthening Efficacy

Following the grouping scheme in Section 2.3.1, the impaired lung function model was established by a 14-day protocol of smoke exposure (30 min/day using 12 cigarettes) and subsequent cold-water immersion (10 min in 10 °C water), with rats allowed to air-dry naturally afterward. Model success was confirmed by symptoms including tachypnea, frequent coughing, and dull fur [20]. The CR water extract was prepared as previously described. While the negative control group received distilled water, the positive control group was administered a 0.6 g/mL suspension of ground Bufei Pills (1 mL/day), which was prepared based on clinical dosages, stored at 4 °C, and brought to room temperature with shaking before use.
On day 14 of administration, apparent symptoms—including breath, cough, lusterless fur, and emaciation—were scored on a scale of 0 (absent) to 3 (severe). Blood samples were drawn from the abdominal aorta, placed in heparinized tubes, and gently inverted to prevent coagulation. Key blood gas parameters [p(O2), SaO2, p(CO2), pH] were immediately analyzed. Furthermore, lung tissue sections were stained with Hematoxylin and Eosin (HE) to assess histopathological changes in alveolar structure, inflammatory cell infiltration, and bronchial mucosa.

2.4. Content Determination

The alcohol-soluble extract content (%) was determined on a dry weight basis according to the Chinese Pharmacopoeia (2025 edition, method 2201) using 3 g of sieved (No. 2 pharmacopoeia sieve) CR powder. The polysaccharide content (mg/g) was determined following our previously reported method. The assay met all methodological validation criteria, including precision, repeatability, stability, and recovery rate [21]. Sieved CR powder (0.25 g) was extracted ultrasonically with 35 mL of 80% ethanol for 30 min. The extracts were then analyzed using the phenol–sulfuric acid method, and the absorbance was read at 490 nm with a microplate reader.

2.5. E-Nose Detection and Modeling

The odor fingerprint of CR was acquired using an E-nose, following the methodology established in our prior research, which identified the optimal sample weight (0.6 g), incubation time (5 min), incubation temperature (40 °C), and injection volume (2000 μL) [22]. To ensure reliability, each sample was analyzed in 6 replicates, and the average value was used as the final result. A Python-based modeling framework was implemented, incorporating feature extraction, selection, and pattern recognition to facilitate model development. We then developed a system and leveraged SHapley Additive exPlanations (SHAP) to provide interpretability for model predictions.

2.6. Data Analysis

Statistical analyses and data visualization were performed with GraphPad Prism version 8.0.2. (GraphPad Software, San Diego, CA, USA). Principal component analysis (PCA) and Orthogonal partial least squares discriminant analysis (OPLS-DA) were carried out using SIMCA 14.1 (Sartorius Stedim Data Analytics AB, Umeå, Sweden), with its default parameters and settings. All classification and regression modeling, development of the data analysis platform, and model interpretation via SHAP were performed using Python 3.10.0. (Python Software Foundation, Wilmington, DE, USA).

3. Results and Discussion

3.1. Spleen-Strengthening Efficacy

The apparent symptoms scores are presented in Table 1. Compared to the negative control group, the model group rats continued to exhibit symptoms including loose stool, lethargy, lusterless fur, and emaciation after 14 days. As the scoring of apparent indicators has a certain degree of subjectivity but remains essential in TCM diagnosis, it was only used for comparisons between the model group and each treatment group, without further comparisons among the treatment groups. Subsequently, biochemical indicators were employed to compensate for the subjective limitations of the apparent indicator scoring. Compared to the model group, all treatment groups (positive control and CR extracts) demonstrated significant improvement (p < 0.05) in all apparent indicators with the exception of fur condition.
Impaired spleen function involves digestive dysfunction, linked to gastrointestinal hormone imbalance and energy metabolism disorders. Dysregulated MTL and GAS secretion, which affects gastrointestinal motility and digestive fluid production, is a key pathological mechanism. The biochemical indexes are shown in Figure 1. Serum levels of MTL and GAS in the model group remained significantly lower than those in the negative control group after 14 days (p < 0.01). Treatment with the positive control and various CR water extracts restored these gastrointestinal hormone levels. Based on statistical efficacy, CR samples could be broadly categorized into two groups: the high-efficacy group (CZ, DX, HB) and the low-efficacy group (CQ, SC, LN).

3.2. Lung-Strengthening Efficacy

The apparent symptoms scores are presented in Table 2. Compared to the negative control group, the model group rats exhibited persistent abdominal breathing, intermittent coughing, unkempt yellowish fur, and poor general condition after 14 days. In contrast, all treatment groups (positive control and CR extracts) showed significant improvement (p < 0.05) in all apparent symptoms except for fur condition relative to the model group.
Blood gas analysis serves as an objective indicator for assessing respiratory and metabolic status, providing key evidence for elucidating the pathophysiological basis of impaired lung function. The biochemical indexes are shown in Figure 2. Compared to the negative control group, rats in the model group exhibited decreased [p(O2)] and SaO2, along with elevated [p(CO2)] in the blood. This indicated severe impairment of alveolar ventilation and gas exchange function, placing the body in a hypoxemic state characterized by inadequate alveolar ventilation and carbon dioxide retention. The reduced pH suggested that the lungs were unable to effectively eliminate volatile acids produced within the body, leading to acid–base homeostasis imbalance. After 14 days of treatment, all four blood gas parameters in the model group remained abnormal. Blood gas parameters in the model group remained significantly lower than those in the negative control group after 14 days (p < 0.01). Treatment with the positive control and various CR water extracts restored these indexes. Based on statistical efficacy, the CR samples could be broadly categorized into two groups: the high-efficacy group (CZ, DX, HB) and the low-efficacy group (CQ, SC, LN). These outcomes were closely aligned with the data analysis in Section 3.1.
Images of HE staining of lung tissue sections are shown in Figure 3. The negative control group exhibited normal pulmonary histoarchitecture, characterized by neatly arranged bronchial mucosal epithelium with clear cilia, uniformly sized alveoli, and thin, intact septa without significant inflammation. In contrast, the model group displayed severe pathological damage, including bronchial mucosal epithelial hyperplasia, disorganized and exfoliated cell arrangement, thickened alveolar walls, and extensive inflammatory cell infiltration. All the treatment groups showed varying degrees of histological improvement compared to the model group, with the positive control, CZ, HB, and DX groups demonstrating the most notable recovery.

3.3. Content Determination

Using GraphPad Prism 8.0.2, the alcohol-soluble extract and polysaccharide contents in CR samples were quantitatively analyzed and visualized, as shown in Figure 4. The results demonstrated that the CZ, DX, and HB groups exhibited significantly higher levels of alcohol-soluble extract compared to the CQ, SC, and LN groups (p < 0.05). A similar trend was observed for the polysaccharide content. These findings were consistent with pharmacological studies in which the collected CR samples were categorized into two distinct groups.

3.4. E-Nose Detection and Modeling

E-nose technology was used to analyze the odor profiles of CR samples, with 18 sensors’ response values over 120 s. We performed PCA and OPLS-DA on the maximum sensor response values using SIMCA 14.1, as shown in Figure 5. The PCA result showed that the first two principal components together explained over 90% of the total variance, indicating high reliability in distinguishing the two sample groups. The OPLS-DA model demonstrated strong goodness-of-fit (R2X = 0.961, R2Y = 0.830) and predictive capability (Q2 = 0.736), with all values surpassing the 0.5 threshold. To rigorously evaluate potential overfitting in light of the limited sample size, a 200-time permutation test was conducted. The results indicated that the intercept of the Q2 regression line on the Y-axis was below zero. Therefore, overfitting is unlikely under the present experimental conditions, which supports the validity of the model. Variable Importance in Projection (VIP) analysis revealed that over half of the sensors had VIP scores > 1, indicating their significant role in discriminating between samples. It should be noted that, although the model demonstrated favorable performance metrics, its generalizability is inherently limited by the sample size of this study. Future validation with larger, independent datasets is required to confirm its broader applicability.
In practical applications, we aimed to develop a predictive model and an intelligent analysis platform that can rapidly translate the odor profile of CR into a comprehensive quality assessment. Using Python 3.10.0, we trained reliable models based on existing datasets to predict key quality indicators for unknown samples. The dataset included two parts: raw 120 s response values from 18 E-nose sensors for all samples, and sample labels (ID and category). For model establishment, firstly, in order to improve computational efficiency and the prediction accuracy of models, it is necessary to process the data. Feature extraction is a key step in signal processing, as obtaining robust features directly affects the effectiveness of subsequent pattern recognition [23]. Transient features extracted using integration and derivative methods have been proven to outperform steady-state features derived solely from maximum values. Relevant studies indicate that feature extraction using wavelet transforms is significantly more effective than traditional steady-state methods [24]. Therefore, we selected the maximum value, integral area, and the mean and standard deviation derived from wavelet variations for the feature extraction section. Secondly, feature selection is a critical step in machine learning and data mining, aiming to filter most representative and relevant features from raw data to enhance model performance, reduce computational costs, and improve result interpretability [25]. Feature selection reduces the risk of overfitting and accelerates model training by eliminating redundant or irrelevant features. Common feature selection methods include filtering, wrapping, and embedding approaches, with appropriate method selected based on specific task requirements and data characteristics [26]. In this study, we selected Mutual Information (MI) from the filtering methods, Recursive Feature Elimination (RFE) from the wrapping methods, and Random Forest (RF) from the embedding methods for the feature selection section. During the feature selection stage, the system employed RF as the base estimator due to its insensitivity to feature quantity and minimal requirement for hyperparameter tuning. For a predefined range of candidate feature numbers, the system automatically calculated the cross-validation mean performance under each configuration and ranked them by score. Ultimately, the system selected the top three feature-number configurations as independent feature subsets, which were then processed in parallel for subsequent model training and evaluation. This approach automated the selection of feature quantity, effectively overcoming the limitations of manual trial-and-error. Thirdly, classic machine learning methods include linear models, tree models, Support Vector Machines, etc. As the field of artificial intelligence expands, machine learning algorithms continue to evolve. Methods such as deep learning based on artificial neural networks and reinforcement learning make models more intelligent. In the pattern recognition section of this study, we selected RF, Support Vector Machine (SVM), and Back Propagation Neural Networks (BPNNs). Next, we used Python to integrate the code to automatically run the generation of three types of feature extraction, three types of feature selection, and three types of pattern recognition combination modeling data for a specific task. At the same time, to address the issue of non-unique results caused by automatic dataset splitting during modeling, we employed grid search and 5-fold cross-validation to refine the algorithm, quantify and manage result randomness, and conduct blind sample validation. Ultimately, through a system interface, we presented and outputted the optimal model, including the best pattern recognition method, optimal model parameters, feature values and corresponding optimal sensor arrays, test set predictions, and model performance metrics. Additionally, we used SHAP for model interpretability to reveal the decision-making mechanism of the optimal model [27].
Based on pharmacological evaluation and chemical composition analysis, CR samples were categorized into two distinct classes. E-nose sensor data were subsequently processed using Python for sample classification. The system interface incorporated functional modules for file upload, parameter configuration, execution and results display, model validation and so on, as shown in Figure 6.
During the modeling process, the dataset was partitioned into the training (70%), validation (15%), and test (15%) sets. For feature extraction, a total of 180 features were derived from the 120 s response profile of each sensor. These features included the maximum response value, integral area, and wavelet variations—specifically, the approximation coefficients and detail coefficients from discrete wavelet transform, along with their corresponding standard deviations. The results indicated that the RF method was selected for feature selection, and the RF model also yielded the best performance. The model parameters were: max depth = 5, min samples leaf = 1, min samples split = 2, and number of trees = 50. The model demonstrated perfect discriminative ability during cross-validation, attaining a mean cross-validation accuracy of 100% and an F1-score of 1.00. The model was further evaluated on a test set, demonstrating its referential value. Although the classification performance was satisfactory, the sample size should be continuously expanded in practical applications to mitigate the inherent limitations of the model. Five wavelet-based features were selected: standard deviation of wavelet approximation coefficient (cA) and detail coefficient 3 (cD3) for sensor S15, standard deviation of cD1 for S8, standard deviation of cD3 for S16, and standard deviation of cA for S18. Among them, S15 was sensitive to ketones and hydrogen sulfide-like gases, S8 to hydrocarbons, S16 to gases with strong oxidative capacity, and S18 to organic compounds. Further studies should be conducted to investigate the volatile compound profiles of different CR samples, enabling better correlation analysis with the identified key E-nose sensors and elucidating the “characteristic aroma profiles” of CR. The extraction of five features, a quantity that is relatively small compared to the sample size, helped mitigate overfitting to some extent. The SHAP feature importance results are shown in Figure 7a.
In this regression task, the limited sample size necessitated the expansion of features extracted from the E-nose sensor response curves. These encompassed the time to peak, area under the curve after baseline subtraction, response values at multiple time points (10, 30, 60, and 120 s), mean and standard deviation of steady-state features (last 20 s), along with the ascending slope, descending slope, and maximum ascent rate of the curve. Subsequently, to eliminate redundant and ineffective features, the system employed low-variance filtering to remove features with nearly constant values across all samples and high-correlation filtering to eliminate highly correlated features, thereby reducing the computational cost and improving model stability. To address the small sample size issue, a data augmentation module was implemented specifically for the sensor time-series data. This module, applied only to the training set, included Gaussian noise augmentation and temporal shift augmentation to expand the dataset during training and prevent model overfitting. For the prediction of the alcohol-soluble extract content, the model combining MI and RF demonstrated the best performance. The model parameters were: max depth = 5, min samples leaf = 1, min samples split = 2, and number of trees = 50. Five features were identified as most important: the standard deviation of detail 1 from the wavelet transform of sensor S8, the maximum ascent rate and response value at 60 s of sensor S10, the maximum ascent rate of sensor S13, and the maximum value of sensor S17. Among them, S8 was sensitive to hydrocarbon gases, S10 and S17 were sensitive to gases with strong oxidative capacity, and S13 was sensitive to combustible gases and organic compounds. The SHAP feature importance results are shown in Figure 7b. For the prediction of the polysaccharide content, the model combining MI and SVM demonstrated the best performance. The model parameters were: penalty coefficient C = 100, epsilon (ε) = 0.001, kernel function = rbf, and gamma (γ) = 1. Six key features were extracted: the area under the curve after baseline subtraction for sensors S1, S5, S6, S3, S11, and S12. Among them, S1 was sensitive to gases with strong oxidative capacity; S5 to hydrogen sulfide-like gases; S6 to propane and butane gases; S3 to ammonia, ethanol, and acetone gases; S11 to aromatic compounds; and S12 to ethanol, ammonia, and organic amines. The SHAP feature importance results are shown in Figure 7c.

4. Conclusions

In this study, CR samples from multiple geographical origins were systematically collected and evaluated using two rat models (impaired spleen function and impaired lung function) and two chemical indexes (alcohol-soluble extract and polysaccharide contents). The analysis revealed a trend wherein the samples could be broadly categorized into two groups: one consisting of samples from CZ, DX, and HB, and the other from LN, SC, and CQ. This preliminary grouping suggests a potential correlation between geographical origin and the measured parameters, although it is acknowledged that the limited sample size and inherent biological variability preclude definitive conclusions. To facilitate rapid and objective quality classification, E-nose technology was employed to capture the “characteristic aroma profiles” of the samples. By integrating machine learning pipelines for feature extraction, selection, and pattern recognition, a classification model was developed and interpreted using SHAP, which identified sensors S8, S15, S16, and S18 as the most influential features for discriminating between sample categories. Nevertheless, we did not explore in depth the mechanistic links between specific sensors, volatile compounds they detect, and the key chemical markers. Elucidating these connections should be a focus of future work. Furthermore, guided by the same principle, we developed a regression task model for content prediction. To address the issue of suboptimal predictive performance arising from the limited sample size, we expanded the feature set and implemented appropriate data augmentation techniques during model training, specifically tailored to the characteristics of the E-nose sensor response curve data. This study provides a methodological framework and research direction for the relevant field. Although the system utilized a training set comprising 15% of the total samples and an additional 15% as a test set to validate the modeling process, this does not offset the fundamental limitation of an inadequate overall sample size. While this study presents a foundational intelligent modeling system, its practical deployment necessitates focused future research in two key areas. First, the stability and reproducibility of the E-nose hardware must be systematically evaluated, addressing practical concerns such as inter-instrument variability, sensor drift, and the need for frequent recalibration. Second, the algorithmic framework requires enhancement to deliver not only predictions but also quantifiable confidence intervals, improving decision reliability. Ultimately, the entire system must undergo rigorous validation using completely independent sample sets to confirm its generalizability before any routine application can be recommended.

Author Contributions

Methodology, Writing-original draft, Writing-review and editing, X.G.; Investigation, Visualization, Z.S.; Validation, Visualization, Y.S.; Methodology, C.W.; Writing-review and editing, R.Y.; Writing-review and editing, Funding acquisition, Y.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by “Key Project of Beijing University of Chinese Medicine, grant number 2023-JYB-JBQN-058” and “Research on the Quality Evaluation of ‘Imported Calculus Bovis’ and Development of Expert AI Identification Equipment for Authenticable and Detectable Bovis-Related Medicinal Materials, grant number 90020271720383”.

Institutional Review Board Statement

The animal study protocol was approved by the Institutional Animal Care and Use Committee of Yi Shengyuan Gene Technology (Tianjin) Co., Ltd. (protocol code YSY-DWLL-2025803 and YSY-DWLL-2025802, 30 August 2025).

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this article are currently under confidentiality restrictions and are therefore not publicly available at this time.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
CRCodonopsis Radix
E-noseElectronic nose
CZChangzhi City, Shanxi Province
DXDingxi City, Gansu Province
LNLongnan City, Gansu Province
SCAba Prefecture, Sichuan Province
CQWushan County, Chongqing Municipality
HBEnshi City, Hubei Province
PCAPrincipal component analysis
OPLS-DAOrthogonal partial least squares discriminant analysis
MIMutual Information
RFERecursive Feature Elimination
RFRandom Forest
SVMSupport Vector Machine
BPNNBack Propagation Neural Networks
SHAPSHapley Additive exPlanations

References

  1. Shi, Q.; Chen, Z.; Yang, J.; Liu, X.; Su, Y.; Wang, M.; Xi, J.; Yang, F.; Li, F. Review of biological activities: A plant of traditional Chinese tonic. J. Ethnopharmacol. 2024, 332, 118334. [Google Scholar] [CrossRef]
  2. Dai, L.; Liu, Z.; Zhou, W.; Zhang, L.; Miao, M.; Wang, L.; Hua, H.; Wang, B.; Guang, J. Sijunzi decoction, a classical Chinese herbal formula, improves fatigue symptoms with changes in gut microbiota in chronic fatigue syndrome: A randomized, double-blind, placebo-controlled, multi-center clinical trial. Phytomedicine 2024, 129, 155636. [Google Scholar] [CrossRef]
  3. Wu, D.; Liu, W.; Wang, J.; Chen, W.; Shi, M.; Zhang, L.; Wang, H.; Ding, H.; Ma, X.; Gao, Y. Clinical application guideline of combination with traditional Chinese medicine and Western medicine in the prevention and treatment of chronic obstructive pulmonary disease. J. Evid.-Based Med. 2025, 18, e70024. [Google Scholar] [CrossRef]
  4. Mei, J.; Shen, S.; Wang, Y.; Wang, Y.; Yi, Y.; Ying, G. Fermentation-assisted extraction of polysaccharides from the roots of Codonopsis pilosula using a selected Rhizopus arrhizus strain. Food Bioprod. Process. 2024, 147, 27–33. [Google Scholar] [CrossRef]
  5. Pan, M.; Zhang, X.; Huang, S.; Liu, M.; Song, S.; Ma, J.; Li, C.; Ma, W.; Liu, X. Preparation, structural characteristics and immune regulatory effects of Codonopsis pilosula polysaccharides: A Review. Front. Immunol. 2025, 16, 1641928. [Google Scholar] [CrossRef] [PubMed]
  6. Wang, Z.; Jia, Y.; Li, P.; Tang, Z.; Guo, Y.; Wen, L.; Yu, H.; Cui, F.; Hu, F. Study on environmental factors affecting the quality of Codonopsis Radix based on MaxEnt model and all-in-one functional factor. Sci. Rep. 2023, 13, 20726. [Google Scholar] [CrossRef] [PubMed]
  7. Liu, Y.; Niu, Y.; Zhou, Z.; Ma, Y.; Chen, M.; Xu, N.; Zhao, F.; Sun, Y.; Chen, P. Insight into endophytic microbiota-driven geographical and bioactive signatures toward a novel quality assessment model for Codonopsis radix. Plant Physiol. Biochem. 2025, 223, 109888. [Google Scholar] [CrossRef]
  8. Yue, X.; Xu, Y.; Sun, B.; Shang, Y.; Yu, Z.; Hu, Y.; Bao, H.; Yue, H. Study on HPLC fingerprint of Saposhnikovia divaricata lipophilic components and anti-aging effects. Sci. Rep. 2024, 14, 25766. [Google Scholar] [CrossRef] [PubMed]
  9. Deng, X.; Fu, Y.; Luo, S.; Luo, X.; Wang, Q.; Hu, M.; Ma, F.; Ma, C.W.; Zhou, L. Polysaccharide from Radix Codonopsis has beneficial effects on the maintenance of T-cell balance in mice. Biomed. Pharmacother. 2019, 112, 108682. [Google Scholar] [CrossRef]
  10. Shao, Y.; Zhao, Y.; Sun, Y.; Guo, Y.; Zhang, X.; Chang, Z.; Hou, R.; Gao, J. Investigation of the internalization and transport mechanism of Codonopsis radix polysaccharide both in mice and Caco-2 cells. Int. J. Biol. Macromol. 2022, 215, 23–35. [Google Scholar] [CrossRef]
  11. Shao, Y.; Liu, X.; Zhang, Z.; Wang, P.; Li, K.; Li, C. Comparison and discrimination of the terpenoids in 48 species of Huajiao according to variety and geographical origin by E-nose coupled with HS-SPME-GC-MS. Food Res. Int. 2023, 167, 112629. [Google Scholar] [CrossRef]
  12. Yu, D.; Zhang, X.; Guo, S.; Yan, H.; Wang, J.; Zhou, J.; Yang, J.; Duan, J. Headspace GC/MS and fast GC E-nose combined with chemometric analysis to identify the varieties and geographical origins of Ginger (Zingiber officinale Roscoe). Food Chem. 2022, 396, 133672. [Google Scholar] [CrossRef]
  13. Luo, Y.; Ouyang, L.; Zhang, S.; Wang, Y.; Yao, P.; Liu, Y.; Chen, X.; Yuan, L.; Wu, Z. Insights into VOCs variation derived from Chinese Black Truffles (Tuber indicum) between Grades via E-nose, HS-SPME-GC-MS, and HS-GC-IMS. Food Chem. X 2025, 31, 102981. [Google Scholar] [CrossRef] [PubMed]
  14. Xia, H.; Chen, W.; Hu, D.; Miao, A.; Qiao, X.; Qiu, G.; Liang, J.; Guo, W.; Ma, C. Rapid discrimination of quality grade of Black Tea based on Near-Infrared Spectroscopy (NIRS), Electronic Nose (E-Nose) and Data Fusion. Food Chem. 2024, 440, 138242. [Google Scholar] [CrossRef] [PubMed]
  15. Girmatsion, M.; Tang, X.; Zhang, Q.; Li, P. Progress in machine learning-supported electronic nose and hyperspectral imaging technologies for food safety assessment: A review. Food Res. Int. 2025, 209, 116285. [Google Scholar] [CrossRef] [PubMed]
  16. Zarezadeh, M.R.; Aboonajmi, M.; Ghasemi-Varnamkhasti, M. The effect of data fusion on improving the accuracy of Olive oil quality measurement. Food Chem. X 2023, 18, 100622. [Google Scholar] [CrossRef]
  17. Singh, S.; Gaur, S. Development of rapid and non-destructive Electric Nose (E-Nose) system for shelf life evaluation of different edible seeds. Food Chem. 2023, 426, 136562. [Google Scholar] [CrossRef]
  18. Zhang, J.; Li, J.; Zhang, B.; Dong, J.; Tian, Y.; Lin, Y.; Fang, G.; Wang, S. Identification of mouldy rice using an electronic nose combined with SPME-GC/MS. J. Stored Prod. Res. 2022, 95, 101921. [Google Scholar] [CrossRef]
  19. Zhang, Y.; Xue, D.; Wang, L.; Jia, R.; Song, Z.; Yu, W.; Zhu, A. Evaluation of animal model with spleen qi deficiency syndrome and analysis of medication characteristics based on data mining and Delphi method. Chin. Tradit. Herb. Drugs 2023, 54, 4590–4598. [Google Scholar]
  20. Zhou, H.; Su, J.; Yan, M.; Ye, C.; Niu, Z.; Han, L.; Yu, J.; Chen, S.; Wu, S.; Lv, G. Study on the effects of polygonatum extract and polygonatum brewed wine on rats with lung qi deficiency. Pharmacol. Clin. Chin. Mater. Medica 2021, 37, 77–82. [Google Scholar] [CrossRef]
  21. Guo, X.; Yang, R.; Wang, Y.; Wang, J.; Wang, Y.; Zou, H.; Yan, Y. Prediction of chemical composition and sensory information of Codonopsis radix based on electronic nose. Molecules 2025, 30, 1146. [Google Scholar] [CrossRef]
  22. Guo, X.; Yang, R.; Wang, J.; Wang, Y.; Yu, S.; Zou, H.; Yan, Y. Identification of Codonopsis radix from different origins based on odor information. Front. Nutr. 2025, 12, 1536189. [Google Scholar] [CrossRef]
  23. Yan, J.; Guo, X.; Duan, S.; Jia, P.; Wang, L.; Peng, C.; Zhang, S. Electronic nose feature extraction methods: A review. Sensors 2015, 15, 27804–27831. [Google Scholar] [CrossRef] [PubMed]
  24. Banerjee, M.B.; Roy, R.B.; Tudu, B.; Bandyopadhyay, R.; Bhattacharyya, N. Black Tea classification employing feature fusion of E-Nose and E-Tongue responses. J. Food Eng. 2019, 244, 55–63. [Google Scholar] [CrossRef]
  25. Gong, H.; Li, Y.; Zhang, J.; Zhang, B.; Wang, X. A new filter feature selection algorithm for classification task by ensembling pearson correlation coefficient and mutual information. Eng. Appl. Artif. Intell. 2024, 131, 107865. [Google Scholar] [CrossRef]
  26. Wang, X.; Zhang, S.; Wang, J.; Liu, X.; Sun, Y.; Shang-Guan, Y.; Zhang, Z. Ensemble learning prediction model for Lithium-Ion battery remaining useful life based on embedded feature selection. Appl. Soft Comput. 2025, 169, 112638. [Google Scholar] [CrossRef]
  27. Zhang, J.; Lin, X.; Jiang, C.; Hu, X.; Liu, B.; Liu, L.; Xiao, L.; Zhu, Y.; Cao, W.; Tang, L. Predicting rice Phenology across China by integrating crop Phenology model and machine learning. Sci. Total Environ. 2024, 951, 175585. [Google Scholar] [CrossRef] [PubMed]
Figure 1. Biochemical indexes. MTL level (a) and GAS level (b). Different lowercase letters above the bars indicate statistically significant differences (p < 0.05).
Figure 1. Biochemical indexes. MTL level (a) and GAS level (b). Different lowercase letters above the bars indicate statistically significant differences (p < 0.05).
Foods 15 00651 g001
Figure 2. Biochemical indexes. p(O2) level (a), SaO2 level (b), p(CO2) level (c) and pH level (d). Different lowercase letters above the bars indicate statistically significant differences (p < 0.05).
Figure 2. Biochemical indexes. p(O2) level (a), SaO2 level (b), p(CO2) level (c) and pH level (d). Different lowercase letters above the bars indicate statistically significant differences (p < 0.05).
Foods 15 00651 g002
Figure 3. HE Staining. Bronchial mucosal injury (a) and inflammatory cell infiltration (b).
Figure 3. HE Staining. Bronchial mucosal injury (a) and inflammatory cell infiltration (b).
Foods 15 00651 g003aFoods 15 00651 g003b
Figure 4. Content determination. Different lowercase letters above the bars indicate statistically significant differences (p < 0.01. Alcohol-soluble extract content was significantly higher in HB than in CQ, 65.664 ± 1.931% vs. 59.632 ± 0.688%, 95% CI, 1.374 to 10.690. Polysaccharide content was significantly higher in CZ than in DX, 40.646 ± 1.894 mg/g vs. 33.563 ± 1.923 mg/g, 95% CI, 2.426 to 11.740).
Figure 4. Content determination. Different lowercase letters above the bars indicate statistically significant differences (p < 0.01. Alcohol-soluble extract content was significantly higher in HB than in CQ, 65.664 ± 1.931% vs. 59.632 ± 0.688%, 95% CI, 1.374 to 10.690. Polysaccharide content was significantly higher in CZ than in DX, 40.646 ± 1.894 mg/g vs. 33.563 ± 1.923 mg/g, 95% CI, 2.426 to 11.740).
Foods 15 00651 g004
Figure 5. PCA and OPLS-DA analysis. PCA plot (a), OPLS-DA plot (b), 200 Random Permutation Tests (c) and VIP plot (d).
Figure 5. PCA and OPLS-DA analysis. PCA plot (a), OPLS-DA plot (b), 200 Random Permutation Tests (c) and VIP plot (d).
Foods 15 00651 g005
Figure 6. System interface.
Figure 6. System interface.
Foods 15 00651 g006
Figure 7. SHAP feature importance results. Classification model (a), regression model for alcohol-soluble extract content (b), regression model for polysaccharide content (c).
Figure 7. SHAP feature importance results. Classification model (a), regression model for alcohol-soluble extract content (b), regression model for polysaccharide content (c).
Foods 15 00651 g007
Table 1. Apparent symptoms scores ( x ¯ ± s, n = 6).
Table 1. Apparent symptoms scores ( x ¯ ± s, n = 6).
GroupApparent Symptoms
Loose StoolLethargyLusterless FurEmaciation
Negative Control0.00 ± 0.00 **0.00 ± 0.00 **0.00 ± 0.00 **0.00 ± 0.00 **
Model3.00 ± 0.003.00 ± 0.003.00 ± 0.002.67 ± 0.52
Positive Control0.00 ± 0.00 **0.33 ± 0.52 **3.00 ± 0.001.33 ± 0.52 **
CZ0.00 ± 0.00 **0.83 ± 0.41 **3.00 ± 0.001.33 ± 0.82 **
DX0.33 ± 0.52 **1.00 ± 0.00 **3.00 ± 0.001.83 ± 0.41 **
LN1.83 ± 0.41 **1.50 ± 0.55 **3.00 ± 0.002.33 ± 0.52 *
SC0.50 ± 0.55 **1.17 ± 0.41 **3.00 ± 0.002.00 ± 0.00 **
CQ1.33 ± 0.52 **1.33 ± 0.52 **3.00 ± 0.002.17 ± 0.41 **
HB0.17 ± 0.41 **0.83 ± 0.41 **3.00 ± 0.001.67 ± 0.52 **
* Compared with model group, * p < 0.05, ** p < 0.01.
Table 2. Apparent symptoms scores ( x ¯ ± s, n = 6).
Table 2. Apparent symptoms scores ( x ¯ ± s, n = 6).
GroupApparent Symptoms
BreathCoughLusterless FurEmaciation
Negative Control0.00 ± 0.00 **0.00 ± 0.00 **0.00 ± 0.00 **0.00 ± 0.00 **
Model3.00 ± 0.003.00 ± 0.003.00 ± 0.002.67 ± 0.52
Positive Control0.33 ± 0.52 **0.50 ± 0.55 **2.83 ± 0.410.67 ± 0.52 **
CZ0.33 ± 0.52 **0.33 ± 0.52 **3.00 ± 0.000.67 ± 0.52 **
DX1.17 ± 0.75 **1.00 ± 0.63 **3.00 ± 0.000.50 ± 0.55 **
LN2.50 ± 0.551.67 ± 0.52 **3.00 ± 0.001.67 ± 0.52 **
SC1.33 ± 0.52 **1.50 ± 0.55 **3.00 ± 0.000.67 ± 0.52 **
CQ1.50 ± 0.55 **1.50 ± 0.55 **3.00 ± 0.001.17 ± 0.41 **
HB0.67 ± 0.52 **0.50 ± 0.55 **3.00 ± 0.000.50 ± 0.55 **
** Compared with the model group, ** p < 0.01.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Guo, X.; Song, Z.; Sun, Y.; Wang, C.; Yang, R.; Yan, Y. Machine Learning Modeling for Codonopsis Radix Quality Assessment Integrating Efficacy, Chemical Composition, and Macroscopic Traits. Foods 2026, 15, 651. https://doi.org/10.3390/foods15040651

AMA Style

Guo X, Song Z, Sun Y, Wang C, Yang R, Yan Y. Machine Learning Modeling for Codonopsis Radix Quality Assessment Integrating Efficacy, Chemical Composition, and Macroscopic Traits. Foods. 2026; 15(4):651. https://doi.org/10.3390/foods15040651

Chicago/Turabian Style

Guo, Xingyu, Ziyue Song, Yunqi Sun, Chi Wang, Ruiqi Yang, and Yonghong Yan. 2026. "Machine Learning Modeling for Codonopsis Radix Quality Assessment Integrating Efficacy, Chemical Composition, and Macroscopic Traits" Foods 15, no. 4: 651. https://doi.org/10.3390/foods15040651

APA Style

Guo, X., Song, Z., Sun, Y., Wang, C., Yang, R., & Yan, Y. (2026). Machine Learning Modeling for Codonopsis Radix Quality Assessment Integrating Efficacy, Chemical Composition, and Macroscopic Traits. Foods, 15(4), 651. https://doi.org/10.3390/foods15040651

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop