Green tea astringent taste grade prediction method
By constructing a green tea astringency sample set and using random forest model and SHAP analysis to screen features, the green tea astringency level prediction model was optimized, solving the problem of screening key components of tea flavor and achieving efficient and accurate prediction of green tea astringency level.
Patent Information
- Application Number
- CN202511453362.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-11
- Publication Date
- 2026-01-09
AI Technical Summary
Existing technologies struggle to accurately identify key components contributing to the flavor of tea, resulting in low reliability of green tea astringency level prediction models and an inability to achieve efficient and accurate prediction of green tea astringency levels.
A sample set of green tea astringency was constructed, and a random forest model was used for initial training. The SHAP analysis method was then used to select high-contribution model input features for secondary training to optimize the random forest prediction model for green tea astringency.
This study realizes digital quality control of green tea astringency level based on the analysis of key astringent components, which improves the accuracy and efficiency of prediction and solves the problem of low model reliability.
Smart Images

Figure CN121306334A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of predicting the astringency of green tea, and in particular to a method for predicting the astringency level of green tea. Background Technology
[0002] The main flavors of tea include bitterness, astringency, umami, sweetness, and sourness, with bitterness and astringency being the dominant flavors. According to the American Society for Testing and Materials (ASTM), astringency is the tactile sensation caused by astringent substances such as alum or tannins contacting the epithelial cells of the mouth, causing the epithelial cells to shrink, draw, or pucker.
[0003] Currently, the quality analysis of green tea mainly relies on sensory evaluation by professional technicians. However, this method places strict demands on the professionalism of the evaluators and the evaluation conditions and environment. Without systematic professional training, it is difficult to master the relevant techniques, and it is inefficient when dealing with large batches of samples, making large-scale automation impossible. Therefore, it is necessary to utilize other technologies to compensate for the shortcomings of sensory evaluation. With the emergence of new detection instruments (such as electronic tongues and mass spectrometry) and detection methods, the data to be collected and analyzed has increased significantly and become more complex and diverse. Currently, researchers are mainly trying to establish an effective link between sensory evaluation and chemical evaluation of tea flavor by building models based on molecular sensory science methods and predictive models based on chemical and metrological methods. That is, to construct a flavor model that links the sensory evaluation of tea with its internal components. According to food flavor evaluation methods, the first step is to identify and screen the flavor-active components of tea. Methods such as using Principal Component Analysis (PCA) to construct a predictive model for the aroma quality of white tea, and employing nonparametric statistical analysis techniques to explore the interactions of various quality attributes and the nonlinearity between biochemical and sensory data, have made positive explorations into objective and operable molecular-level methods for evaluating tea flavor. However, the screening of flavor compounds in tea remains unclear, with many unrelated components or those present in too low a concentration to be perceived by the human body being included in mathematical models of tea flavor, resulting in low reliability of the model results. Therefore, scientifically and accurately screening key flavor-contributing components, removing invalid variables, and constructing a scientifically sound and reasonable model for evaluating the astringency level of tea are the focus of future research. Summary of the Invention
[0004] The purpose of this application is to provide a method for predicting the astringency level of green tea, which can achieve efficient and accurate prediction of the astringency level of green tea with high reliability.
[0005] To achieve the above objectives, this application provides the following solution: This application provides a method for predicting the astringency level of green tea, including: A green tea astringency sample set was constructed; wherein each tea astringency sample includes a secondary metabolite group and a corresponding astringency level label; the secondary metabolite group includes forty-two secondary metabolites of green tea; The random forest model was initially trained using the green tea astringency sample set to obtain the green tea astringency random forest prediction model. Based on the random forest prediction model for astringency in green tea, the SHAP analysis method is used to determine the SHAP value of each model input feature, and the model input features are screened according to the SHAP value to obtain high contribution model input features; the high contribution model input features are fifteen high contribution secondary metabolites of green tea. After simplifying the green tea astringency sample set based on the high contribution model input features, the random forest model is trained a second time to obtain an optimized random forest prediction model for green tea astringency.
[0006] According to the specific embodiments provided in this application, the following technical effects are disclosed: Based on the random forest prediction model for green tea astringency, this application uses the SHAP analysis method to determine the SHAP value of each model input feature (i.e., secondary metabolites) and selects high-contribution model input features. Based on this, the green tea astringency sample set is simplified and then trained again to obtain an optimized random forest prediction model for green tea astringency. Thus, this application determines the optimal model based on SHAP feature selection, which removes features with little impact on the prediction of green tea astringency level, accurately selects key contributors, and solves the problem of low reliability in existing technologies. Finally, this application obtains a grade discrimination model between "chemical composition characteristics → astringency level," achieving a breakthrough in digital quality control technology for green tea astringency level based on key astringency component analysis, and providing intelligent means for green tea quality control. Attached Figure Description
[0007] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0008] Figure 1 This is a flowchart illustrating a method for predicting the astringency level of green tea in one embodiment of this application.
[0009] Figure 2 This is a schematic diagram showing the relative content of forty-two secondary metabolites in green tea samples tested for different astringency levels in this application.
[0010] Figure 3 This is a schematic diagram of the training process for a machine learning model.
[0011] Figure 4 This is a schematic diagram of the confusion matrix prediction results of five machine learning models classifying the astringency level of green tea based on an independent test set.
[0012] Figure 5 A schematic diagram showing the importance ranking of the SHAP values of high-contribution secondary metabolites in the high-contribution secondary metabolite component group.
[0013] Figure 6 A schematic diagram of the cross-validation set AUC curve for optimizing the random forest prediction model for the astringency of green tea.
[0014] Figure 7 A schematic diagram illustrating the test set confusion matrix prediction results of the random forest prediction model for green tea astringency.
[0015] Figure 8 A schematic diagram illustrating the confusion matrix prediction results of the random forest prediction model for green tea astringency on different batches of astringency sample datasets. Detailed Implementation
[0016] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0017] This application addresses the astringency levels of green tea samples with different astringency grades by analyzing physicochemical and sensory indicators. It quantifies the astringency level of green tea liquor using EGCG standard solutions of varying concentrations. By combining multivariate statistics and modern instrumental analysis, it screens, evaluates, and constructs a random forest prediction model for the astringency of green tea samples. This enables the graded evaluation of astringency in green tea, with the aim of promoting digital quality control of green tea.
[0018] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0019] In one exemplary embodiment, such as Figure 1 As shown, a method for predicting the astringency level of green tea is provided, including the following steps 201 to 204.
[0020] Step 201: Construct a green tea astringency sample set; wherein each tea astringency sample includes a secondary metabolite group and a corresponding astringency level label; the secondary metabolite group includes forty-two secondary metabolites of green tea.
[0021] In one application, step 201 includes the following steps: 1) Collect fresh green tea leaf samples, dry them, and divide them into two sets of samples. In practical applications, fresh green tea leaf samples can be collected from a tea garden and dried in a microwave oven. The drying process is as follows: 20g of fresh tea leaf sample, heat on high for 30 seconds, remove and turn; heat on high for 30 seconds, remove and turn; heat on medium for 1 minute, remove and turn; heat on medium for 1 minute, remove and turn; when partially dry, switch to low heat for 30 seconds per cycle, until the sample is crisp, then collect the sample. Then store the dried sample in a -20℃ refrigerator for testing.
[0022] 2) The first group of green tea samples underwent a sensory evaluation of astringency to determine the astringency grade label. In practical applications, in accordance with GB / T 23776-2018, different concentrations of EGCG aqueous solutions were used as references to quantify the astringency intensity of the tea samples and determine the astringency grade accordingly.
[0023] Specifically, the sensory evaluation experiment was conducted in a dedicated tea sensory evaluation room (26±1℃, relative humidity 70±3%), following GB / T 23776-2018 "Sensory Evaluation Method for Tea". 3 g of green tea was placed in an evaluation cup, and boiling water was poured in at a tea-to-water ratio of 1:50 (M:V), steeping for 3 minutes. The sensory evaluation of the tea infusion was conducted by five professionally trained members. To quantify the astringency intensity of these tea samples, EGCG aqueous solution was used as a reference, and the tea evaluation team members were trained to evaluate the astringency intensity scores of different concentrations of EGCG aqueous solution. The concentration gradient of EGCG aqueous solution and its corresponding astringency level are shown in Table 1.
[0024] Table 1
[0025] 3) The second group of green tea samples is subjected to quality component detection to obtain the secondary metabolite component group; the secondary metabolite component group corresponding to the green tea fresh leaf sample and the astringency grade label constitute a green tea astringency sample; multiple green tea astringency samples constitute a green tea astringency sample set.
[0026] In practical applications, 30g of dried tea sample was weighed and pulverized to 100 mesh using a grinder. 0.03g of the pulverized tea sample was weighed into a 2 mL centrifuge tube, two white zirconium beads were added, and 500 μL of extraction buffer (80% methanol-water) was accurately added. The sample was placed in an ice-water mixture and sonicated for 20 minutes. After sonication, the sample was centrifuged at 12000 rpm for 10 minutes, and the supernatant was collected. The residue was then extracted three times with 500 μL of extraction buffer using shaking. The supernatants were combined and brought to a final volume of 2 mL. After a three-fold dilution, the mixture was filtered through a 0.22 μm microporous membrane for analysis.
[0027] To identify phenolic compounds in the extract, this application employed a Triple Quad 5500+ LC-MS / MS system (ABSciex, America) for analysis. Chromatographic separation was performed using a Shimadzu Inertsil ODS-3 column (particle size: 5 μm, column length: 100 mm, inner diameter: 2.1 mm), with a mobile phase of 0.4% acetic acid in water (A) and 100% acetonitrile (B). The linear elution gradient was as follows: from 0 to 10 minutes, phase B increased from 0.1% to 7% (v / v); from 10 to 22 minutes, phase B remained at 7%; from 22 to 25 minutes, phase B increased to 11%; to 30 minutes, phase B increased to 12%; to 31 minutes, phase B increased to 14%; to 43 minutes, phase B increased to 35%; to 45 minutes, phase B increased to 50%; to 47 minutes, phase B increased to 80%; and to 50 minutes, phase B decreased to 0.1%, after which the sample was re-injected after equilibration for 5 minutes. The flow rate, column temperature, and injection volume were set to 0.2 mL / min, 40℃, and 2 μL, respectively. Mass spectrometry was performed using an electrospray ionization (ESI) source, acquiring data in both positive and negative ion modes. The curtain gas CUR was 30 psi; the collision gas CAD was medium; the source temperature TEM was 325℃; the spray gas GS1 was 50 psi; the auxiliary heating gas GS2 was 50 psi; the IS voltage was 4500 V; the declustering voltage DP was set to 60-280 V; and the collision voltage CE was set to 5-20 eV. The mass-to-charge ratio ranged from m / z 70 to 1800. The peak areas of the compounds under MRM detection conditions were recorded as the relative abundance of the compounds in the sample.
[0028] Based on the ion fragment characteristics of the mass spectrometer compounds, a total of 42 major secondary metabolites were detected and identified, including theanine, caffeine, 8 catechins, 8 proanthocyanidins, 5 organic acids and phenolic acids, 16 flavonols and their glycosides, and the relative contents of 3 hydrolyzed tannins. The relative contents of the secondary metabolites are shown in [reference needed]. Figure 2 .
[0029] Thus, this application has achieved the extraction and relative content analysis of secondary metabolites in green tea samples, the sensory evaluation of astringency in green tea samples, and the quantification of astringency intensity in tea samples.
[0030] Step 202: The random forest model is initially trained using the green tea astringency sample set to obtain the green tea astringency random forest prediction model.
[0031] To further improve the ability to distinguish tea samples with different astringency levels, this application constructs several mainstream supervised machine learning classification models. By comparing the prediction effects of multiple machine learning classification models, the optimal random forest prediction model for green tea astringency is obtained, thereby deeply exploring the mapping relationship between the secondary metabolites of green tea and the astringency level. Specifically, step 202 includes the following steps: (1) Construct multiple machine learning models. Among them, the multiple machine learning models include at least: random forest model, support vector machine model, gradient boosting machine model, k-nearest neighbor algorithm model and Naive Bayes classification model.
[0032] (2) Based on the green tea astringency sample set, a five-fold stratified cross-validation method is used to train each of the machine learning models, and the optimal model is selected from the trained machine learning models. In a specific application, step (2) includes the following sub-steps: 1) Divide the green tea astringency sample set into a training sample set and a test sample set; specifically, divide them in a 7:3 ratio to ensure that the samples of each astringency level are evenly distributed in the two sets.
[0033] 2) For any machine learning model, based on the aforementioned training sample set, train it using a five-fold hierarchical cross-validation method; such as Figure 3 As shown, based on the training sample set, stratified 5-fold cross-validation is used for training to reduce performance fluctuations caused by sample imbalance and random partitioning, and to enhance the model's generalization ability.
[0034] 3) The machine learning model after training is tested using the test sample set, and multiple performance evaluation metrics are calculated. Among them, the multiple performance evaluation metrics include at least: average accuracy, precision, recall, F1-score, ROC curve, and macro-average AUC and micro-average AUC calculated based on the One-vs-Rest strategy.
[0035] Accuracy refers to the proportion of samples correctly predicted by the model out of the total number of samples. This metric reflects the overall predictive accuracy of the model and is suitable for situations where the class distribution is relatively balanced. The calculation formula is: .
[0036] Precision measures the proportion of samples that a model predicts to be "positive," but which actually belong to the positive class. It is used to evaluate the reliability of a model's positive class predictions, and is particularly useful in scenarios where the reliability of a "predicted positive" result is crucial. The calculation formula is: .
[0037] Recall represents the proportion of true positive samples correctly identified by the model. This metric emphasizes the model's sensitivity and is suitable for tasks with low tolerance for false negatives. The calculation formula is: .
[0038] The F1 score is the harmonic mean of precision and recall, representing a weighted trade-off between the two. When the balance between precision and recall is equally important, the F1 score provides a more comprehensive evaluation of model performance. The calculation formula is: .
[0039] Among them, TP (True Positive) is a true positive, TN (True Negative) is a true negative, FP (False Positive) is a false positive, and FN (False Negative) is a false negative.
[0040] Table 2 below shows a comparison of the evaluation results of the machine learning model-five-fold cross-validation.
[0041] Table 2
[0042] In addition to the four indicators mentioned above, the Receiver Operating Characteristic Curve (ROC) and its corresponding Area Under Curve (AUC) are introduced as supplementary evaluation indicators during the cross-validation process.
[0043] For the multi-class classification task (i.e., different astringency levels) in this application, a "one-vs-Rest" (OvR) strategy is adopted, where each class of samples is treated as the positive class and the remaining classes as the negative class. ROC curves for each class are plotted and the corresponding single-class AUC values are calculated. To more comprehensively quantify the overall performance of the model, the macro-average AUC and micro-average AUC of the model are further calculated.
[0044] Macro-average AUC: This metric is a simple average of the AUCs for each class, without considering differences in sample size across classes. It reflects the model's overall ability to distinguish between all classes and is suitable for measuring the model's performance on samples from smaller classes. The formula for calculating macro-average AUC is: .
[0045] Where C represents the total number of astringency levels (C=3), and AUC i Let represent the individual AUC of the i-th category.
[0046] Micro-average AUC: The AUC is calculated by summarizing the prediction results of each category at the sample level. It emphasizes the average discriminative ability of the model in the global scope. Its TPR and FPR are defined as follows: ; .
[0047] Table 3 below shows a comparison of the AUC evaluation results for the cross-validation set.
[0048] Table 3
[0049] To further verify the generalization ability of each model in practical applications, this application conducted independent performance evaluations on five machine learning models based on the previously divided test set (accounting for 30% of the original dataset). The test set data remained completely isolated during the training process.
[0050] Based on a green tea astringency sample set, a five-fold stratified cross-validation method was used to train each machine learning model separately, and the optimal model was selected from the trained models. This application, through the determination of this optimal model and its subsequent application, can solve the problem of low efficiency in manual testing of large batches of samples. In particular, the application of such a machine learning model can establish an effective link between sensory and chemical evaluation, while ensuring both efficiency and accuracy.
[0051] 4) Select the optimal model based on multiple performance evaluation metrics for each machine learning model. During model validation, a confusion matrix is introduced as a core visualization tool to visually demonstrate the correspondence between the true labels and model predictions for each astringency level (low astringency LA, medium astringency MA, high astringency HA). The confusion matrix clearly shows the model's correct and incorrect classifications across different categories, providing crucial support for determining the model's performance.
[0052] like Figure 4 As shown, Figure 4 Figure A in the diagram represents the confusion matrix of the gradient booster. Figure 4Graph B in the diagram is the confusion matrix of the K-nearest neighbor algorithm. Figure 4 The C-graph in the diagram represents the confusion matrix of the Naive Bayes algorithm. Figure 4 The D-graph in the image represents the confusion matrix of the random forest. Figure 4 The E-graph in the diagram represents the confusion matrix of the support vector machine. (The text then repeats the information about the E-graph and the confusion matrix of the support vector machine.) Figure 4 The comparison of multiple graphs shows that different models exhibit significant differences in their class discrimination capabilities. The Random Forest model achieves completely correct classification of all three classes on the test set, meaning that all samples are accurately identified without any misclassifications, demonstrating extremely high generalization performance and robustness.
[0053] In summary, the optimal machine learning model is the Random Forest model. This model not only demonstrates relatively superior overall performance on the cross-validation set but also achieves the highest classification accuracy on the test set. This indicates that it possesses strong discriminative ability and adaptability in multi-class tasks, making it suitable as a key target for subsequent model optimization and in-depth analysis. Therefore, this application uses a green tea astringency sample set for initial training of the Random Forest model, resulting in a green tea astringency random forest prediction model.
[0054] Step 203: Based on the random forest prediction model for astringency in green tea, the SHAP analysis method is used to determine the SHAP value of each model input feature, and the model input features are screened according to the SHAP value to obtain high contribution model input features; wherein, the high contribution model input features are fifteen high contribution secondary metabolites of green tea.
[0055] In a specific application, this application further introduces SHAP (SHapley Additive exPlanations) analysis to interpretably deconstruct the model's prediction mechanism, performing independent interpretive analysis on the prediction output of each target category (low astringency LA, medium astringency MA, and high astringency HA). SHAP is based on the Shapley value concept in game theory, achieving a unification of global and local interpretations by quantifying the contribution of each feature to the machine learning model's prediction results. Step 203 includes the following steps: (21) For each green tea astringency sample, the predicted probability of astringency level output by the random forest prediction model for green tea astringency can be expressed as: , The random forest prediction model for green tea astringency indicates the category The predicted score or probability.
[0056] (22) In the SHAP analysis, based on the predicted probability of astringency level of all the green tea astringency samples, the marginal SHAP value of each secondary metabolite is calculated using the following formula: .
[0057] in, (c) For the first i The marginal SHAP value of each model input feature at the astringency level c, where the model input feature refers to the secondary metabolite component; F Input the complete feature set into the model. S Not including the first i A subset of the features of the model input features; f c ( S This indicates that the optimization model is using a subset of the model input features. S Astringency level under certain conditions c The predicted probability, This indicates that the optimization model is using a subset of the model input features. Astringency level under certain conditions c The predicted probability.
[0058] (23) To quantify the contribution of each feature across different categories, the mean absolute SHAP value of each secondary metabolite for each astringency level was calculated across all said green tea astringency samples, based on the marginal SHAP value of each secondary metabolite; mean absolute SHAP value The calculation formula is: .
[0059] in, m The number of samples of astringent green tea; Indicates the first j The first green tea astringency sample i Each model input feature corresponds to the astringency level. c The SHAP value.
[0060] (24) Based on the mean absolute SHAP value, all the secondary metabolites are sorted and a preset number of secondary metabolites are selected in order from front to back. Then they are marked as high contribution model input features. Thus, multiple high contribution secondary metabolites with the most discriminative power in classification decision are identified.
[0061] Specifically, the mean absolute SHAP value of each feature under each category is calculated sequentially, and the top fifteen features in terms of global importance are listed based on their mean absolute SHAP values across categories, reflecting their relative impact on the prediction of different astringency levels in the model. The ranking criteria are as follows: .
[0062] in, C =3 represents the number of categories for the astringency level.
[0063] like Figure 5The diagram shows the importance ranking of SHAP values for high-contribution secondary metabolites in the high-contribution secondary metabolite group. The fifteen high-contribution secondary metabolites in green tea are: apigenin-6-C-glucosyl-8-C-arabinoside, vitexin, strictinin, 3-O-galloylquinic acid, prothocyanidin B4, catechin, prothocyanidin B3, quercetin-3-O-glucoside, and epicatechin gallate. The astringency of green tea is attributed to several chemical components, including gallate, quercetin-3-O-galactoside, caffeine, L-theanine, C-EGC (a catechin-epigallocatechin dimer), gallatechin-glucoside, and trigalloyl glucose. Analysis indicates that the astringency level of green tea is closely related to various chemical components. The main astringent components screened were catechins and their derivatives, which are the primary source of astringency. Proanthocyanidins may enhance the persistence of astringency, while flavonoids and their glycosides offer different astringent sensations. L-theanine, as an amino acid, is believed to alleviate or reduce astringency to some extent.
[0064] Step 204: After simplifying the green tea astringency sample set based on the input features of the high contribution model, the random forest model is trained a second time to obtain an optimized random forest prediction model for green tea astringency.
[0065] To verify the effectiveness of key metabolic features in the model simplification process, the top 15 high-contribution secondary metabolites selected using SHAP analysis were used to construct a simplified random model (i.e., the optimized green tea astringency level prediction model), and the same strategy as before was employed for performance evaluation. Table 4 below shows the cross-validation set evaluation index of the optimized green tea astringency random forest prediction model, and Table 5 below shows the AUC evaluation results of the cross-validation set of the optimized green tea astringency random forest prediction model.
[0066] Table 4
[0067] Table 5
[0068] like Figure 6 and Figure 7 The image shows the cross-validation AUC curve and the test set confusion matrix prediction results of the optimized random forest prediction model for green tea astringency. The results show that the model maintains excellent classification performance despite a significant reduction in feature dimensions. In cross-validation, its average accuracy is 0.877 and its F1 score is 0.872, indicating high levels of robustness to key variables. Further ROC analysis shows that the micro-average AUC and macro-average AUC of the RF model are 0.932 and 0.922, respectively, indicating good overall discriminative ability and class balance performance.
[0069] The prediction results on the independent test set further validated its stability and generalization ability. The RF model achieved 100% accuracy in both the HA (high astringency) and LA (low astringency) categories, and 90% accuracy in the MA (astringency) category, demonstrating high balance and stability.
[0070] To further evaluate the applicability of the simplified model to different batches of data, it was tested on an external validation set (consisting of 15 newly collected independent samples). The results are as follows: Figure 8 As shown, the optimized random forest prediction model for green tea astringency exhibits stable predictive performance. All five HA samples were correctly classified (100% accuracy), and four out of five samples in each of the MA and LA classes were correctly predicted (80% accuracy in both classes), with an average accuracy of 86.67%. This further confirms that the optimized random forest prediction model for green tea astringency has strong predictive ability in determining the astringency level of tea.
[0071] Therefore, based on the combined cross-validation performance, ROC curve analysis, and prediction results from the test set and external validation set, the optimized random forest prediction model for green tea astringency, constructed based on SHAP key metabolic features, was determined to be the optimal random forest prediction model for astringency. This model not only demonstrates excellent overall classification performance but also exhibits good inter-class balance, making it suitable for rapid determination of astringency levels in green tea, digital quality control, and automated applications. In application, when the optimized random forest prediction model for green tea astringency receives fifteen high-contribution secondary metabolites of the target green tea, it outputs the corresponding astringency level.
[0072] In summary, this application involves rapidly drying fresh green tea leaves immediately after harvesting using a microwave oven. Two copies of the dried sample are prepared: one for sensory evaluation of astringency, quantifying the astringency level according to the well-known GB / T 23776-2018 standard and using EGCG aqueous solutions of different concentrations as references; the other for the detection of tea quality components, specifically targeting 42 major secondary metabolites from the fresh tea leaves. A predictive model for astringency level is constructed and screened based on the quantitative mapping relationship between the astringency intensity of the tea sample and the 42 major secondary metabolites. Based on the random forest model obtained in the above steps, the SHAP analysis method is used to screen key astringency substances in green tea, identifying the core components that contribute most to astringency level discrimination. A simplified random forest model is constructed using the key metabolic characteristics screened by SHAP, thus determining the model for predicting astringency level. This application not only provides a model for predicting the astringency level of green tea but also applies this model to predicting the astringency level of finished green tea, resulting in higher detection efficiency and reliability.
[0073] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0074] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for predicting the astringency level of green tea, characterized in that, The method includes: A green tea astringency sample set was constructed; wherein each tea astringency sample includes a secondary metabolite group and a corresponding astringency level label; the secondary metabolite group includes forty-two secondary metabolites of green tea; The random forest model was initially trained using the green tea astringency sample set to obtain the green tea astringency random forest prediction model. Based on the random forest prediction model for astringency in green tea, the SHAP analysis method is used to determine the SHAP value of each model input feature, and the model input features are screened according to the SHAP value to obtain high contribution model input features; the high contribution model input features are fifteen high contribution secondary metabolites of green tea. After simplifying the green tea astringency sample set based on the high contribution model input features, the random forest model is trained a second time to obtain an optimized random forest prediction model for green tea astringency.
2. The method for predicting the astringency level of green tea according to claim 1, characterized in that, The fifteen high-contribution secondary metabolites of the green tea are: Apigenin-6-C-glucoside-8-C-arabinoside, rhamnine, ephedrine, 3-O-galloylquinic acid, proanthocyanidin B4, catechin, proanthocyanidin B3, quercetin-3-O-glucoside, epicatechin gallate, quercetin-3-O-galactoside, caffeine, theanine, catechin-epigallocatechin dimer, gallocatechin glucoside, trigalloylglucoside.
3. The method for predicting the astringency level of green tea according to claim 1, characterized in that, Based on the aforementioned random forest prediction model for green tea astringency, the SHAP analysis method is used to determine the SHAP value of each model input feature. The model input features are then filtered based on their SHAP values to obtain high-contribution model input features, including: For each green tea astringency sample, obtain the predicted probability of astringency level output by the green tea astringency random forest prediction model; Based on the predicted probability of astringency level of all the green tea astringency samples, the marginal SHAP value of each secondary metabolite is calculated; Based on the marginal SHAP value of each secondary metabolite, the average absolute SHAP value of each secondary metabolite for each astringency level was calculated in all the said green tea astringency samples. Based on the mean absolute SHAP value, all the secondary metabolites are sorted, and a preset number of secondary metabolites are selected in order from front to back, and then marked as high contribution model input features.
4. The method for predicting the astringency level of green tea according to claim 1, characterized in that, Construct a sample set of astringent tastes in green tea, including: Fresh green tea leaf samples were collected, dried, and then made into two copies to form two groups of green tea samples. The first group of green tea samples underwent a sensory evaluation of astringency to determine the astringency level label. The second group of green tea samples was subjected to quality component testing to obtain a secondary metabolite component group; the secondary metabolite component group corresponding to the green tea fresh leaf sample and the astringency grade label constitute a green tea astringency sample; multiple green tea astringency samples constitute a green tea astringency sample set; The forty-two secondary metabolites of the green tea include theanine, caffeine, eight catechins, eight proanthocyanidins, five organic acids and phenolic acids, sixteen flavonols and their glycosides, and the relative contents of three hydrolyzed tannins.
5. The method for predicting the astringency level of green tea according to claim 1, characterized in that, The selection process for the random forest model before training it includes: Build multiple machine learning models; Based on the green tea astringency sample set, a five-fold stratified cross-validation method was used to train each of the machine learning models, and the optimal model was selected from the multiple machine learning models after training; the optimal model was a random forest model.
6. The method for predicting the astringency level of green tea according to claim 5, characterized in that, Multiple machine learning models include at least: random forest model, support vector machine model, gradient boosting machine model, k-nearest neighbor algorithm model, and Naive Bayes classification model.
7. The method for predicting the astringency level of green tea according to claim 5, characterized in that, Based on the aforementioned green tea astringency sample set, a five-fold stratified cross-validation method was used to train each of the aforementioned machine learning models, and the optimal model was selected from the multiple trained machine learning models, including: The green tea astringency sample set was divided into a training sample set and a test sample set. For any machine learning model, training is performed using the aforementioned training sample set and a five-fold hierarchical cross-validation method. The trained machine learning model was tested using the test sample set, and multiple performance evaluation metrics were calculated. The optimal model is selected based on multiple performance evaluation metrics for each machine learning model.
Citation Information
Cited By
Raw tea sensory classification and flavor critical threshold extraction method and system
CN122132928A