Fruit wine quality prediction and improvement method based on machine learning
By combining MF-DCCA and TE methods, the nonlinear causal relationship between the physical and chemical properties of fruit wine and the quality score is analyzed, and the gradient enhancement regression model is used to predict the quality of fruit wine, which solves the problem that traditional methods are difficult to reveal nonlinear causal relationships, and achieves efficient controllability and cost control of fruit wine quality.
Patent Information
- Application Number
- CN202510233388.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-17
AI Technical Summary
The prior art is difficult to effectively reveal the nonlinear causal relationship between the physical and chemical properties of fruit wine and quality scores, and traditional methods have low requirements for the interpretability of the model, making it difficult to deeply explore the true impact of various physical and chemical properties on the quality of fruit wine.
Multi-fractal detrend fluctuation cross-correlation analysis (MF-DCCA) and transfer entropy (TE) method were used to analyze the nonlinear causal relationship between the physical and chemical properties of fruit wine and the quality score, extract key features, and predict the adjusted fruit wine quality through gradient enhancement model.
By systematically revealing the complex relationship between the quality of fruit wine and the physical and chemical properties, the controllability of fruit wine quality is improved, the R&D cycle and material waste is reduced, and new ideas are provided for the production, R&D and quality improvement of fruit wine.
Smart Images

Figure CN120162565A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of fruit wine and machine learning, and in particular to a method for predicting and improving the quality of fruit wine based on machine learning. Background Art
[0002] The quality of fruit wine is closely related to its physical and chemical properties. Traditional methods for evaluating the quality of fruit wine usually rely on sensory evaluation, which is highly subjective, and the results are affected by the evaluator's personal preferences, experience, and evaluation environment. Therefore, it is difficult to reveal the complex nonlinear relationship between the physical and chemical properties of fruit wine and its quality based on experience and artificial methods.
[0003] With the widespread application of machine learning technology, researchers have begun to try to use data-driven methods to evaluate and predict the quality of fruit wine. However, existing methods mainly rely on traditional statistical models such as linear regression and cluster analysis, which fail to effectively reveal the nonlinear causal relationship between the physical and chemical properties of fruit wine and the quality score. In addition, most methods have low requirements for the interpretability of the model, making it difficult to deeply explore the true impact of various physical and chemical properties on the quality of fruit wine.
[0004] Especially for a fruit wine that has been developed and put into production, how to optimize its quality at a low cost has become a key issue that R&D personnel need to solve urgently. With the changes in market demand, how to improve product quality while ensuring production efficiency and cost has become an important challenge in fruit wine production. Therefore, finding effective optimization methods to improve the quality of fruit wine while controlling costs has become an important task for the R&D team. Summary of the invention
[0005] In view of the shortcomings of the prior art, the present invention provides a method for predicting and improving the quality of fruit wine based on machine learning. The present invention combines multifractal detrended fluctuation cross correlation analysis (MF-DCCA) with the transfer entropy (TE) method to analyze the nonlinear causal relationship between the physical and chemical properties of fruit wine and the quality score, and extract key features; then adjust the key features of the fruit wine within a reasonable range, and then predict the adjusted fruit wine quality through a gradient boosting regression model. By analyzing the prediction results, data support can be provided for the optimization and improvement of new fruit wine products.
[0006] The technical solution adopted by the present invention is as follows:
[0007] A method for predicting and improving fruit wine quality based on machine learning, comprising the following steps:
[0008] S1. Establish a fruit wine quality dataset: Collect the physical and chemical property data and corresponding quality score data of several fruit wine samples to establish a fruit wine quality dataset.
[0009] Among them, the physical and chemical properties are characteristics that affect the quality of fruit wine and can be quantified; the quality score is evaluated by at least three scorers according to a standardized scoring system, and the scoring range is 0 to 10 points, with 0 being very poor and 10 being excellent.
[0010] S2. MF-DCCA analysis: The cross-correlation between physical and chemical properties and quality scores was analyzed by MF-DCCA method to obtain the cross-correlation index between each characteristic and quality score; the cross-correlation index calculation formula is as follows:
[0011]
[0012] Among them, ρ(X i ,Y i ) represents the cross-correlation index of i samples; X i represents the characteristics of the i-th sample, Y i represents the quality score of the i-th sample, They represent the mean of feature X and quality score Y of all samples respectively, and N is the total number of samples. Substitute each feature into formula (1) to calculate the cross-correlation index corresponding to each feature.
[0013] S3.TE analysis: The nonlinear causal relationship between the physical and chemical properties of fruit wine and the quality score was analyzed by the transfer entropy (TE) method, and the transfer entropy value between each characteristic and the quality score was obtained;
[0014] S4. Determine the key features: add the cross-correlation index between each feature and the quality score obtained in S2 and the transfer entropy value between each feature and the quality score obtained in S3, and preliminarily sort the features according to the added values; then set weights for each feature based on the adjustment cost of each feature; finally, re-sort the features according to the weights, and select the top 3 features as the key features in the optimization process.
[0015] S5. Training the machine learning model: selecting a machine learning model; training the machine learning model using a fruit wine quality dataset to obtain a trained machine learning model.
[0016] S6. Optimization guidance: For the fruit wine to be optimized, change the value of at least one key feature, and then use the trained machine learning algorithm to predict the quality of the fruit wine; when the prediction result meets the requirements, the value of the changed key feature is used as the improvement target of the fruit wine.
[0017] Furthermore, the fruit wine quality dataset contains at least 1,200 samples.
[0018] Furthermore, the physicochemical properties include fixed acidity, volatile acidity, citric acid, residual sugar, chloride, free sulfur dioxide, total sulfur dioxide, density, pH, sulfate and alcohol.
[0019] Furthermore, the machine learning model is a random forest, support vector machine, gradient boosting tree or XGBoost machine learning model.
[0020] The present invention can systematically reveal the complex relationship between the quality and physical and chemical properties of fruit wine through MF-DCCA and TE analysis methods; then consider the difficulty and cost of adjusting each feature to set the weight, and select key features in combination with the weight; finally, adjust the key features of the fruit wine to be optimized, and accurately predict the quality of the adjusted fruit wine through a machine learning model, providing research and development personnel with a research direction for improving the quality of fruit wine. The method of the present invention provides a new idea for the production, research and development, and quality improvement of fruit wine, which not only improves the controllability of fruit wine quality, but also reduces the research and development cycle and material waste. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] To facilitate a better understanding of the technical solution of the present invention, the accompanying drawings are described as follows:
[0022] Figure 1 : Flowchart of a method for predicting and improving wine quality based on machine learning assistance according to an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to better illustrate the purpose, advantages and technical ideas of the present invention, the technical scheme of the present invention is further described below in conjunction with the accompanying drawings and specific examples. It should be noted that the specific examples given below only serve to explain the present invention, and the protection scope of the present invention is not limited to the following.
[0024] Taking red grapes as an example, the method for predicting and improving the quality of fruit wine based on machine learning in this embodiment includes the following steps:
[0025] S1. Obtain a wine quality dataset: Select a publicly available wine dataset containing 1599 red wine samples; each sample contains 11 physical and chemical property data (fixed acidity, volatile acidity, citric acid, residual sugar, chloride, free sulfur dioxide, total sulfur dioxide, density, pH, sulfate and alcohol), and each sample has a sensory quality score ranging from 0 to 10.
[0026] S2. MF-DCCA analysis: MF-DCCA analysis was performed on the collected physicochemical property data and quality score data to calculate the cross-correlation index between the physicochemical properties and the quality score to reveal their cross-correlation; the calculation formula of the cross-correlation index is as follows:
[0027]
[0028] Among them, ρ(X i ,Y i ) represents the cross-correlation index of i samples; X i represents the characteristics of the i-th sample, Y i represents the quality score of the i-th sample, They represent the mean of feature X and quality score Y of all samples respectively, and N is the total number of samples; the value of the cross-correlation index is between -1 and +1, and the closer the value is to +1, the more positive the cross correlation is, and the closer the value is to -1, the more negative the cross correlation is.
[0029] In this embodiment, each feature is substituted into formula (1) and the cross-correlation index corresponding to each feature is calculated as shown in Table 1. The cross-correlation between the two can be intuitively shown in the figure.
[0030] Table 1
[0031]
[0032] S3.TE analysis: TE method was used to analyze the causal relationship between physicochemical properties and quality scores on the same data set; specifically:
[0033] Transfer entropy is a measure of the amount of information transferred from a feature to a quality score. Based on the concept of conditional entropy, the transfer entropy from feature X to quality score Y is calculated using the following formula:
[0034] TE(X→Y)=H(Y|X)-H(Y) (2)
[0035] TE(X→Y) represents the transfer entropy value from feature X to quality score Y, H(Y|X) represents the conditional entropy of quality score Y under the condition of given feature X, and H(Y) represents the entropy of quality score Y.
[0036] The transfer entropy value of each characteristic was calculated using formula (2), and the results are shown in Table 2. Through the transfer entropy value analysis, the causal relationship between the physical and chemical properties and the quality score can be clearly revealed.
[0037] Table 2
[0038]
[0039] S4. Determine key features: add the cross-correlation index between each feature and the quality score obtained in S2 and the transfer entropy value between each feature and the quality score obtained in S3, and preliminarily sort the features according to the added numerical values; in this embodiment, the preliminary sorting result is alcohol (1.95)>volatile acidity (0.24)>free sulfur dioxide (0.16)>density (0.33)>residual sugar (-0.65)>chloride (-1.33)>citric acid (0.26)>total sulfur dioxide (0.02)>pH (0.56)>sulfate (0.22)>fixed acidity (-1.50).
[0040] The corresponding weight is set according to the adjustment cost of each feature. In this embodiment, considering the difficulty and cost of implementation, the weight of each feature is set as follows: alcohol (0.2), volatile acidity (0.15), free sulfur dioxide (0.15), density (0.1), residual sugar (0.15), chloride (0.1), citric acid (0.1), total sulfur dioxide (0.1), pH (0.1), sulfate (0.1), and fixed acidity (0.1).
[0041] Add the weight value to the value of the preliminary sorting result, and reorder the features in the physical and chemical properties: alcohol>pH>density>volatile acidity>citric acid>free sulfur dioxide>sulfate>total sulfur dioxide>residual sugar>chloride>fixed acidity; then select the first three features as key features.
[0042] S5. Training machine learning models: Select linear regression, random forest, support vector machine, gradient boosting regression and XGBoost machine learning models; use wine quality datasets to train and verify the machine learning models to obtain trained machine learning models; specifically:
[0043] The data set is divided into a training set and a test set. The training set is used to train the above machine learning model, and the test set is used for five-fold cross validation. Then, according to the training mode parameters mean square error (MSE), mean absolute error (MAE), R 2 , RMSE and other evaluation indicators are used to evaluate the prediction performance of each model.
[0044] These indicators can be used to evaluate the performance of the regression model. The smaller the MSE and RMSE, the smaller the prediction error of the model. MAE more intuitively represents the deviation of the average predicted value. R2 is used to measure the goodness of fit of the model. The closer the value is to 1, the better the model fits the data. Taking all factors into consideration, the gradient boosting regression model performs best and is used as the machine learning model of this embodiment.
[0045] S6. Optimization guidance: For the wine to be optimized, change the value of at least one key feature, and then use the trained machine learning algorithm to predict the quality of the wine to obtain a predicted quality score; when the predicted quality score meets the requirements, the value of the changed key feature is used as the improvement target of the wine.
[0046] Based on the MF-DCCA and TE analysis methods, and considering the implementation cost, the present invention selects the most influential key features, changes the concentration within a reasonable and safe range, constructs new wine physical and chemical property data, and then predicts the quality score of the newly generated wine through the trained machine learning model. According to the predicted quality score, the R&D personnel adjust the winemaking process parameters, such as sugar content, acidity, etc., to optimize the wine quality.
Claims
1. A method for predicting and improving fruit wine quality based on machine learning, characterized in that: The following steps are involved: S1. Establish a fruit wine quality data set: collect the physical and chemical property data of several fruit wine samples and the corresponding quality score data to establish a fruit wine quality data set; The physical and chemical properties are quantifiable characteristics that affect the quality of the wine; the quality score is assessed by at least three scorers according to a standardized scoring system, with a score range of 0 to 10, where 0 is very poor and 10 is excellent; S2. MF-DCCA analysis: The cross-correlation between physicochemical properties and quality scores was analyzed by MF-DCCA method to obtain the cross-correlation index between each characteristic and quality score; S3.TE analysis: The nonlinear causal relationship between the physical and chemical properties of fruit wine and the quality score was analyzed by the transfer entropy (TE) method, and the transfer entropy value between each characteristic and the quality score was obtained; S4. Determine the key features: add the cross-correlation index between each feature and the quality score obtained in S2 and the transfer entropy value between each feature and the quality score obtained in S3, and preliminarily sort the features according to the added values; then set a weight for each feature based on the adjustment cost of each feature; finally, re-sort the features according to the weights, and select the top three features as the key features in the optimization process; S5. Training the machine learning model: selecting a machine learning model; training the machine learning model using the wine quality dataset to obtain a trained machine learning model; S6. Optimization guidance: For the fruit wine to be optimized, change the value of at least one key feature, and then use the trained machine learning algorithm to predict the quality of the fruit wine; when the prediction result meets the requirements, the value of the changed key feature is used as the improvement target of the fruit wine.
2. The method for predicting and improving fruit wine quality based on machine learning as claimed in claim 1, characterized in that: The cross-correlation index calculation formula is as follows: Among them, ρ(X i ,Y i ) represents the cross-correlation index of i samples; X i represents the characteristics of the i-th sample, Y i represents the quality score of the i-th sample, They represent the mean of feature X and quality score Y of all samples respectively, and N is the total number of samples. Substitute each feature into formula (1) to calculate the cross-correlation index corresponding to each feature.
3. A method for predicting and improving fruit wine quality based on machine learning as claimed in claim 2, characterized in that: The physicochemical properties include fixed acidity, volatile acidity, citric acid, residual sugar, chloride, free sulfur dioxide, total sulfur dioxide, density, pH, sulfate and alcohol.
4. A method for predicting and improving fruit wine quality based on machine learning as described in claim 3, wherein the fruit wine quality data set contains at least 1,200 samples.
5. A method for predicting and improving fruit wine quality based on machine learning as described in claim 4, wherein the machine learning model is a random forest, support vector machine, gradient boosting tree or XGBoost machine learning model.
Citation Information
Cited By
Mulberry wine quality prediction system and method based on multi-dimensional data fusion
CN121071845A
