Machine learning multi-model fusion method for predicting base liquor yield of Maotai-flavor liquor
Through the machine learning multi-model fusion method, combined with the physical and chemical indicators of wine mash and daqu, the output of sauce-flavored liquor is predicted, which solves the problem of inaccurate yield prediction in the existing technology, and achieves high accuracy and low cost output prediction.
Patent Information
- Application Number
- CN202411655914.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-11
AI Technical Summary
The prior art relies too much on manual experience when predicting and regulating the yield of sauce-flavored liquor, and the existing model characteristic data and brewing process parameters are limited, resulting in inaccurate yield prediction.
The machine learning multi-model fusion method is adopted to detect the physical and chemical indicators of wine mash and daqu, and combine models such as RandomForest, GradientBoosting, XGBoost and other models to predict the production of sauce-flavored liquor.
Accurate and stable prediction of the output of sauce-flavored liquor is achieved, with low economic costs and high operation ease, and avoiding the limitations of manual experience.
Smart Images

Figure CN119601126A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of liquor brewing, and in particular to a machine learning multi-model fusion method for predicting the yield of sauce-flavor liquor base wine. Background Art
[0002] Maotai-flavor liquor is a typical representative of the twelve types of Chinese liquor. The unique and complex multi-sequence brewing process has created the characteristics of Maotai-flavor liquor, such as mellow body, prominent Maotai aroma, elegant and delicate, and long-lasting aroma in the empty cup. Among the complex and multi-sequence brewing processes, the "high-temperature koji making" and "stacking fermentation" processes are the most critical. Among them, the physical and chemical parameters such as acidity, sugar, moisture, and starch in the koji and fermented grains can indirectly regulate the differences in the metabolic functions of the microorganisms in the fermentation process of liquor by affecting the endogenous ecological environment of the wine-producing microorganisms, thereby directly determining the actual production process. However, the entire liquor brewing industry currently relies too much on artificial experience judgment for the prediction and regulation of liquor production. It is urgent to develop an objective and accurate prediction model to predict and regulate the production of Maotai-flavor liquor.
[0003] Existing models for predicting liquor production are constructed and applied, such as the Chinese invention patent with patent number 202210818695.9 and patent name "A method for predicting liquor fermentation yield", which provides a method for predicting liquor production based on the length of mash piled up and the fermentation temperature of mash at different pit depths. This method predicts liquor production by constructing and applying a GradientBoosting prediction model. However, the model feature data in this prediction method is limited to mash, and the selected brewing process parameters are limited to temperature, which cannot truly reflect the actual production process of sauce-flavor liquor, resulting in inaccurate production prediction. The Chinese invention patent with patent number 202311216251.9 and patent name "A brewing process parameter optimization method based on SHAP value" provides a brewing process parameter optimization method based on SHAP value, which determines the optimal values of the brewing process parameters that affect the quality of liquor during the liquor brewing process. The method predicts the quality grade of liquor by constructing and applying the Xgboost prediction model combined with the SHAP method. However, the model application of this method only selects the Xgboost model for regression prediction, and the single model is too dependent on training data, and may have weak generalization ability in the test set or real-world scenarios, and is prone to overfitting or underfitting, resulting in inaccurate model predictions.
[0004] Brewing process parameters are crucial to the output of liquor. For example, appropriate acidity can effectively promote the activity of yeast with wine-producing ability during liquor fermentation and enhance its adaptability to the environment, thereby ensuring the smooth fermentation of liquor and directly increasing the level of alcohol production. Water is the basis of the living environment of microorganisms during the fermentation process. Appropriate moisture content can maintain the activity of microorganisms and ensure the normal progress of the fermentation process, thereby increasing the output of liquor. In addition, sufficient reducing sugars provide yeast with fermentable sugars to support the continuous production of alcohol by yeast, and the starch content is gradually converted into reducing sugars to maintain the continuity of fermentation and the efficiency of alcohol production. These brewing process parameters work together to ensure the output level during the liquor production process. Therefore, there is an urgent need for a method that can integrate multiple process parameters to achieve accurate prediction of the output of Maotai-flavor liquor. Summary of the invention
[0005] The present invention aims to provide a machine learning multi-model fusion method for predicting the yield of base wine of Maotai-flavor liquor. After the physical and chemical indexes of the mash and Daqu in the fermentation of Maotai-flavor liquor are tested, the yield of Maotai-flavor liquor is predicted by multi-model fusion of RandomForest, GradientBoosting, XGBoost and other models, thereby realizing the prediction of the yield of Maotai-flavor liquor, which has the advantages of good accuracy, high stability and low economic cost.
[0006] A machine learning multi-model fusion method for predicting the yield of Maotai-flavor liquor base wine in this scheme includes the following steps:
[0007] Step 1: Routine physical and chemical index testing of mash and Daqu: number the teams with different liquor production and collect samples, and then test the acidity, moisture, reducing sugar, starch and other physical and chemical indicators in the mash and Daqu according to the existing physical and chemical index testing standards for sauce-flavor liquor.
[0008] Step 2: Data preprocessing: Based on the physical and chemical index data obtained in step 1, perform feature selection, feature standardization and data set division on the data.
[0009] Step 3: Construction and tuning of basic models: RandomForest, GradientBoosting and XGBoost models were selected as basic models, and hyperparameters were tuned.
[0010] Step 4: Construction of fusion model: The fusion model combines multiple basic models through stacking technology, and uses a meta-learner to learn the output of the basic model.
[0011] Step 5: Model performance evaluation: R2 (coefficient of determination), RMSE (root mean square error), and MAPE (mean percentage error) are used to evaluate the performance of the model on the test set. The performance of each model on the test set is demonstrated by evaluating the models used in previous liquor prediction patents (GradientBoosting, XGBoost) and the final Stacking model.
[0012] Step 6: Compare the model prediction value with the true value: Through the regression goodness of fit graph and the line comparison graph of the measured value and the actual value, the fitting effect, prediction error and performance of each model on different samples can be intuitively analyzed.
[0013] Step 7, prediction application: randomly select samples for physical and chemical index testing according to step 1, and then input them into the above-constructed fusion model to predict the liquor production.
[0014] Furthermore, the mash sample in step one comes from the piled fermented mash in the actual production of Maotai-flavor liquor, and the Daqu sample comes from the qu used in the production of Maotai-flavor liquor.
[0015] Furthermore, the temperature, acidity, reducing sugar, moisture, and starch physical and chemical indexes of the fermented grains sample in step one are tested, and the acidity, reducing sugar, starch, and moisture physical and chemical indexes of the Daqu sample in step one are tested.
[0016] Furthermore, in step 2, feature selection separates the features and target variables in the data set, X contains the feature data, and y is the target variable; feature standardization uses the StandardScaler function to standardize the feature data X, so that the mean of each feature is 0 and the variance is 1, and the data set is divided into 80% training set and 20% test set. This helps improve the performance of some models that rely on the data range (such as linear models) and ensures that the model can be evaluated on the test set.
[0017] Furthermore, in step three, the hyperparameter tuning uses GridSearchCV to search for hyperparameters of each basic model, select the optimal parameter combination, optimize the model performance, and use the cross-validation method CV=3 for the tuning parameters to ensure the robustness of the model.
[0018] Furthermore, in the step 4, the fusion model also adds ExtraTrees and Ridge regression models: RandomForest: Random Forest uses 4000 trees, the maximum depth of the tree is 18, and the minimum number of samples required for node division is adjusted; GradientBoosting: 3000 trees are set, the maximum depth is 10, and the learning rate is small (0.02), which improves the generalization ability of the model; ExtraTrees: Similar to Random Forest, a completely random partition of random features is used to build a decision tree; 3000 trees are used, and the maximum depth is 18. Ridge: used for regularized linear regression, and the regularization strength is controlled to be alpha = 0.1; XGBoost is used as the meta-learner of the fusion model, combining the prediction outputs of multiple base models, combining these models through StackingRegressor, and using XGBoost as the final prediction model; passthrough = True means that the original features will be passed to the meta-learner and used together with the prediction values of the base model.
[0019] Further, in step 5, R 2 Score: measures the model's ability to explain the data; RMSE (Root Mean Squared Error): root mean square error, measures the error between the model's predicted value and the actual value; MAPE (Mean Absolute Percentage Error): mean absolute percentage error, measures the relative value of the prediction error.
[0020] Furthermore, the regression goodness of fit graph in step six shows the comparison between the value predicted by the model and the actual value. The closer the distance between the predicted value and the actual value, the better the model effect. The comparison graph of predicted value and actual value shows the comparison between the actual value and the predicted value of each sample, showing the overall effect of sample prediction.
[0021] Furthermore, in step seven, the fusion model is input to return the predicted value, mainly by loading the previously saved trained fusion model (StackingRegressor) and standardization tool (StandardScaler), and then accepting a set of feature inputs (such as QU-Moisture, JP-Temperature, etc.), standardizing the input features, and using the model to predict the production of liquor, and finally returning and outputting the predicted results.
[0022] The beneficial effects of the present invention are as follows: The method in this scheme has two advantages: (1) The low-cost and short-time physical and chemical index detection technology is applied to solve the production difficulty that the traditional manual experience is not objective and accurate in predicting the yield of the base liquor of the sauce-flavor liquor. (2) The RandomForest, GradientBoosting, XGBoost and other multi-model fusion machine learning regression prediction models for the production of sauce-flavor liquor are developed by using the Jupyter Notebook platform and python3.8 software. Once the prediction model is constructed, it can be called at any time without repeated construction. It has the advantages of simple operation, high discrimination accuracy and low economic cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A flow chart of the method for predicting liquor production according to the present invention;
[0024] Figure 2 The regression goodness of fit diagram of the model in the present invention is (a) GradientBoosting (b) Stacking Model (c) XGBoost; the line comparison diagram of the model prediction value and the actual value is (a) GradientBoosting (b) Stacking Model (c) XGBoost. DETAILED DESCRIPTION
[0025] The following is a further detailed description through specific implementation methods:
[0026] Example 1: Specific method flow for predicting liquor production is as follows Figure 1 As shown, a machine learning multi-model fusion method for predicting the yield of Maotai-flavor liquor base wine includes the following steps:
[0027] Step 1: Testing of conventional physical and chemical indicators of fermented mash and Daqu: Testing of acidity, reducing sugar and other physical and chemical indicators according to the China Alcoholic Drinks Association Group Standard T / CBJ 004-2018 "General Analysis Method for Solid Fermented Mash" and the People's Republic of China Light Industry Standard QB / T 4257-2011 "General Analysis Method for Brewing Daqu". The fermented mash samples come from the fermented mash piled up in the production of Maotai-flavor liquor, and the Daqu samples come from the Daqu used in the production of Maotai-flavor liquor.
[0028] Step 2: Data preprocessing; Based on the physical and chemical index data obtained in step 1, first separate the features and target variables in the obtained data set, X contains the feature data (physical and chemical index data), and y is the target variable (white wine production); StandardScaler function is used to standardize the feature data X, so that the mean of each feature is 0 and the variance is 1; finally, the obtained data set is divided into 80% training set and 20% test set to ensure that the model can be evaluated on the test set. The specific code is as follows:
[0029] #Features and target variables
[0030] X = data.drop(columns = ['target', 'sample']) # Feature data
[0031] y=data['target']#target variable
[0032] #Feature Standardization
[0033] scaler = StandardScaler()
[0034] X_scaled=scaler.fit_transform(X)
[0035] # Divide the dataset into training set (80%) and test set (20%)
[0036] X_train,X_test,y_train,y_test=train_test_split(X_scaled,y,test_size=0.2,random_state=42)
[0037] Step 3: Construction and tuning of the basic model. RandomForest (random forest regression), GradientBoosting (gradient boosting machine) and XGBoost (extreme gradient boosting regression model) are selected as the basic models, and GridSearchCV is used for hyperparameter tuning to obtain the optimal model to ensure the robustness of the model. The specific code is as follows:
[0038]
[0039]
[0040] Step 4: Construction of the fusion model: The fusion model uses Stacking technology to continue to improve and optimize the basic model, and also adds ExtraTrees and Ridge regression models to combine multiple basic models together, and uses the XGBoost meta-learner to learn the output of the basic model. The specific code is as follows:
[0041]
[0042]
[0043]
[0044] Step 5: Model prediction performance evaluation; R2 (coefficient of determination), RMSE (root mean square error) and MAPE (mean percentage error) are used to evaluate the performance of the model on the test set. The performance of each model on the test set is demonstrated by evaluating the models used in previous liquor prediction patents (GradientBoosting, XGBoost) and the final Stacking model. The specific code is as follows:
[0045] #Train Stacking model
[0046] stacking_model.fit(X_train,y_train)
[0047] # Make predictions on the test set
[0048] y_pred=stacking_model.predict(X_test)
[0049] #Evaluate model performance
[0050] r2_test=r2_score(y_test,y_pred)
[0051] rmse_test=np.sqrt(mean_squared_error(y_test,y_pred))
[0052] mape_test=mean_absolute_percentage_error(y_test,y_pred)
[0053] #Output evaluation indicators of the Stacking model
[0054] print(f'R2 on test set(Stacking):{r2_test:.4f}')
[0055] print(f'RMSE on test set(Stacking):{rmse_test:.4f}')
[0056] print(f'MAPE on test set(Stacking):{mape_test:.4f}')
[0057] # Train the model
[0058] grid_rf.fit(X_train,y_train)
[0059] grid_gboost.fit(X_train,y_train)
[0060] grid_xgb.fit(X_train,y_train)
[0061] # Get the optimal model
[0062] best_rf = grid_rf.best_estimator_
[0063] best_gboost = grid_gboost.best_estimator_
[0064] best_xgb = grid_xgb.best_estimator_
[0065] # Evaluate GradientBoosting alone
[0066] y_pred_gboost = best_gboost.predict(X_test)
[0067] r2_gboost = r2_score(y_test,y_pred_gboost)
[0068] rmse_gboost = np.sqrt(mean_squared_error(y_test,y_pred_gboost))
[0069] mape_gboost = mean_absolute_percentage_error(y_test,y_pred_gboost)
[0070] # Evaluate XGBoost alone
[0071] y_pred_xgb = best_xgb.predict(X_test)
[0072] r2_xgb=r2_score(y_test,y_pred_xgb)
[0073] rmse_xgb=np.sqrt(mean_squared_error(y_test,y_pred_xgb))
[0074] mape_xgb=mean_absolute_percentage_error(y_test,y_pred_xgb)
[0075] #Output the evaluation indicators of each individual model
[0076] print(f"RandomForest R2:{r2_rf:.4f},RMSE:{rmse_rf:.4f},MAPE:{mape_rf:.4f}")
[0077] print(f"GradientBoosting R2:{r2_gboost:.4f},RMSE:{rmse_gboost:.4f},MAPE:{mape_gboost:.4f}")
[0078] print(f"XGBoost R2:{r2_xgb:.4f},RMSE:{rmse_xgb:.4f},MAPE:{mape_xgb:.4f}")
[0079] Step 6: Compare the model prediction value with the actual value: Through the regression goodness of fit graph and the line comparison graph of the measured value and the actual value, the fitting effect, prediction error and performance of each model on different samples can be intuitively analyzed. The specific code is as follows:
[0080] #Model fit goodness of fit plot
[0081] def plot_goodness_of_fit(y_test,y_pred,model_name):
[0082] plt.figure(figsize=(6,6))
[0083] plt.scatter(y_test,y_pred,edgecolors='k',c='red',s=50,marker='o',alpha=0.7,label='Prediction')
[0084] plt.scatter(y_test, y_test, edgecolors='k', c='gray', s=50, marker='s', alpha=0.5, label='Calibration')
[0085] plt.plot([min(y_test), max(y_test)], [min(y_test), max(y_test)], 'k-', lw=2, label='Fit')
[0086] plt.xlabel('Reference(Actual)')
[0087] plt.ylabel('Predicted')
[0088] plt.title(f'Goodness of Fit-{model_name}')
[0089] plt.legend(loc="upper left")
[0090] pdf_path = os.path.join(desktop_path, f"{model_name}_goodness_of_fit.pdf")
[0091] plt.savefig(pdf_path, format='pdf')
[0092] plt.show()
[0093] # Model prediction value and true value line comparison chart
[0094] def plot_prediction_comparison(y_test, y_pred, model_name):
[0095] plt.figure(figsize=(10, 6))
[0096] plt.plot(range(len(y_test)), y_test, label="Real value", color='blue', marker='o', linestyle='-', linewidth=1, markersize=6)
[0097] plt.plot(range(len(y_pred)),y_pred,label="Predicted value",color='red',marker='s',linestyle='-',linewidth=1,markersize=6)
[0098] plt.xlabel('Prediction Sample')
[0099] plt.ylabel('Prediction Results')
[0100] plt.title(f'Comparison of Predicted vs Actual-{model_name}')
[0101] plt.legend()
[0102] pdf_path=os.path.join(desktop_path,f"{model_name}_prediction_comparison.pdf")
[0103] plt.savefig(pdf_path,format='pdf')
[0104] plt.show()
[0105] Step 7, prediction application: Obtain the physical and chemical index data of the fermented grains and Daqu samples to be tested according to step 1, and then input them into the prediction model constructed above to output the predicted value of liquor production. The specific code is as follows:
[0106]
[0107]
[0108]
[0109] Example 2: Experimental process
[0110] 1. Sample information
[0111] The samples in this embodiment are derived from the mash and Daqu samples provided by a sauce-flavor liquor production company in Maotai Town, Guizhou Province. There are 1,778 samples in total, 889 mash samples in total, and 889 Daqu samples in total. Among them, the mash samples come from the piled fermented mash in the production of sauce-flavor liquor, and the Daqu samples come from the Daqu used in the production of sauce-flavor liquor.
[0112] 2. Physical and chemical index detection of fermented grains
[0113] The physical and chemical indicators that need to be tested for the mash are temperature, acidity, reducing sugar, moisture, and starch, and all experimental tests are carried out in accordance with the China Alcoholic Drinks Association group standard T / CBJ 004-2018 "General Analysis Method for Solid-State Fermentation Mash".
[0114] 3. Testing of physical and chemical indicators of Daqu
[0115] The physical and chemical indicators that need to be tested for Daqu are acidity, reducing sugar, moisture, and starch, and all of them are tested in accordance with the light industry standard of the People's Republic of China QB / T 4257-2011 "General Analysis Method for Brewing Daqu".
[0116] 4. Data Preprocessing
[0117] The variables and sample information were input, and the model was constructed using python3.8 software combined with the Jupyter Notebook platform. First, the data was subjected to feature selection, feature standardization, and data set division.
[0118] 5. Basic model construction and tuning
[0119] Using python3.8 software combined with the Jupyter Notebook platform, we selected RandomForest (random forest regression), GradientBoosting (gradient boosting machine) and XGBoost (extreme gradient boosting) regression models as the basic models, and used GridSearchCV for hyperparameter tuning.
[0120] 6. Construction of Fusion Model
[0121] Through Stacking technology, in addition to the above basic models, ExtraTrees and Ridge regression models are also selected for multi-model fusion. At the same time, XGBoost is selected as the meta-learner of the fusion model to combine the prediction outputs of multiple basic models.
[0122] 7. Model prediction performance evaluation
[0123] The performance of the model on the test set is evaluated by three indicators: R2 (coefficient of determination), RMSE (root mean square error), and MAPE (mean percentage error). The Stacking model is used to compare the models used in previous patents related to liquor prediction models (GradientBoosting, XGBoost), and the performance of each model on the test set is shown in Table 1.
[0124] Table 1 Evaluation of model prediction performance
[0125] Model R2 RMSE MAPE XGBoost 0.69 284.27 0.16 Gradient Boosting 0.68 288.12 0.15 Stacking Model 0.74 265.36 0.14
[0126] As can be seen from Table 1, XGBoost and GradientBoosting are two independent ensemble learning models. They perform similarly, have a general ability to explain data, and have similar errors. The Stacking fusion model combines the advantages of multiple basic models and further optimizes them on the meta-learner, so its performance is significantly better than that of a single model. 2 In terms of the three evaluation indicators of , RMSE and MAPE, the Stacking model shows stronger prediction ability, especially in reducing the prediction error. Therefore, the Stacking model is the best performing model among the three models and is suitable for more complex prediction tasks.
[0127] 8. Comparison of model predictions and true values
[0128] Through the regression goodness of fit graph and the line comparison graph of predicted value and actual value, the fitting effect, prediction error and performance of each model on different samples can be intuitively analyzed. Figure 2 .
[0129] from Figure 2 It can be seen that the Stacking model performs best in the two visualizations (goodness of fit plot and predicted value comparison plot). Its predicted value is closer to the actual value and has the best fitting effect, which shows that the model can comprehensively utilize the advantages of multiple basic models to improve the overall prediction performance. Although the XGBoost model also performs well, its error is slightly higher than that of the Stacking model. The GradientBoosting model performs the worst with a large error, especially in the goodness of fit plot and the prediction comparison plot.
[0130] 9. Prediction application: The liquor prediction fusion model constructed using the above opinions was used to predict the liquor production of samples randomly selected in advance. The results are shown in Table 2.
[0131] Table 2 External test sample verification results
[0132] serial number Predicted value (kg) Actual value (kg) Accuracy BJ3-111 2441.12 2455 0.99 BJ3-117 2396.24 2352.81 0.89 BJ3-51 2155.02 2413.5 0.98 BJ3-173 1995.01 2202.2 0.91 BJ5-13 1680.38 1730.6 0.97
[0133] As can be seen from Table 2, the average accuracy of the method provided in this application is as high as 0.94, which shows that the prediction model has a good effect on predicting liquor production.
[0134] Obviously, compared with the method of regression prediction by single model modeling, the accuracy and stability of the fusion model in the method provided by this application are improved, and the prediction method has extremely low economic cost, no expensive detection equipment is required, and except for the reagents and consumables required for the physical and chemical index detection in step one, the whole process basically does not require other expenses. More importantly, the Jupyter Notebook platform uses python3.8 software to provide a lot of packages or functions for building prediction models. Therefore, the use of python3.8 combined with the Jupyter Notebook platform to build a prediction model can ensure that non-professionals can easily operate it through less training, which greatly avoids the misjudgment caused by the lack of professionalism of the operator, and once the model is built, the subsequent simple input of the corresponding characteristic value can obtain the predicted output of liquor, and the prediction of liquor output can be completed in 10 minutes, which not only avoids the high cost paid by the enterprise to train professional operators, but also improves the work efficiency of the enterprise.
[0135] The above is only an embodiment of the present invention, and the common knowledge such as the known specific structure and characteristics in the scheme is not described in detail here. It should be pointed out that for those skilled in the art, several deformations and improvements can be made without departing from the structure of the present invention, which should also be regarded as the protection scope of the present invention, and these will not affect the effect of the implementation of the present invention and the practicality of the patent. The scope of protection required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.
Claims
1. A machine learning multi-model fusion method for predicting the yield of Maotai-flavor liquor base wine, characterized by: The following steps are involved: Step 1: Testing of conventional physical and chemical indicators of fermented grains and Daqu: numbering and collecting samples from teams with different liquor production, and then testing the acidity, moisture, reducing sugar, starch and other physical and chemical indicators in fermented grains and Daqu according to the existing testing standards for physical and chemical indicators of Maotai-flavor liquor; Step 2, data preprocessing: based on the physical and chemical index data obtained in step 1, feature selection, feature standardization and data set division are performed on the data; Step 3: Construction and tuning of basic models: RandomForest, GradientBoosting and XGBoost models were selected as basic models, and hyperparameters were tuned; Step 4: Construction of fusion model: The fusion model combines multiple basic models through stacking technology and uses a meta-learner to learn the output of the basic models; Step 5: Model performance evaluation: R2 (coefficient of determination), RMSE (root mean square error), and MAPE (mean percentage error) are used to evaluate the performance of the model on the test set. The performance of each model on the test set is demonstrated by evaluating the models used in previous liquor prediction patents (GradientBoosting, XGBoost) and the final Stacking model separately. Step 6: Compare the model prediction value with the actual value: Through the regression goodness of fit graph and the line comparison graph of the measured value and the actual value, the fitting effect, prediction error and performance of each model on different samples can be intuitively analyzed; Step 7, prediction application: randomly select samples for physical and chemical index testing according to step 1, and then input them into the above-constructed fusion model to predict the liquor production.
2. A machine learning multi-model fusion method for predicting the yield of Maotai-flavor liquor base wine according to claim 1, characterized in that: The mash sample in step 1 comes from the mash fermented in the actual production of Maotai-flavor liquor, and the Daqu sample comes from the qu used in the production of Maotai-flavor liquor.
3. A machine learning multi-model fusion method for predicting the yield of Maotai-flavor liquor base wine according to claim 2, characterized in that: In step 2, feature selection separates the features and target variables in the data set, where X contains the feature data and y is the target variable; feature standardization uses the StandardScaler function to standardize the feature data X so that the mean of each feature is 0 and the variance is 1. The data set is divided into 80% training set and 20% test set.
4. A machine learning multi-model fusion method for predicting the yield of Maotai-flavor liquor base wine according to claim 3, characterized in that: In the step 3, the hyperparameter tuning uses GridSearchCV to search for hyperparameters of each basic model, select the optimal parameter combination, optimize the model performance, and use the cross-validation method CV=3 for the tuning parameters to ensure the robustness of the model.
5. A machine learning multi-model fusion method for predicting the yield of Maotai-flavor liquor base wine according to claim 4, characterized in that: In the step 4, the fusion model also adds ExtraTrees and Ridge regression models, RandomForest: Random Forest uses 4000 trees, the maximum depth of the tree is 18, and the minimum number of samples required for node division is adjusted; GradientBoosting: 3000 trees are set, the maximum depth is 10, and the learning rate is small (0.02), which improves the generalization ability of the model; ExtraTrees: Similar to Random Forest, a completely random partitioning of random features is used to establish a decision tree; 3000 trees are used with a maximum depth of 18, Ridge: used for regularized linear regression, and the regularization strength is controlled to be alpha = 0.1; XGBoost is used as the meta-learner of the fusion model, combining the prediction outputs of multiple base models, combining these models through StackingRegressor, and using XGBoost as the final prediction model; passthrough = True means that the original features will be passed to the meta-learner and used together with the prediction values of the base model.
6. A machine learning multi-model fusion method for predicting the yield of Maotai-flavor liquor base wine according to claim 5, characterized in that: In step 5, R 2 Score: measures the model's ability to explain the data; RMSE (Root Mean Squared Error): root mean square error, measures the error between the model's predicted value and the actual value; MAPE (Mean Absolute Percentage Error): mean absolute percentage error, measures the relative value of the prediction error.
7. A machine learning multi-model fusion method for predicting the yield of Maotai-flavor liquor base wine according to claim 6, characterized in that: The regression goodness of fit graph in step 6 shows the comparison between the value predicted by the model and the actual value. The closer the distance between the predicted value and the actual value, the better the model effect. The comparison graph of predicted value and actual value shows the comparison between the actual value and predicted value of each sample, showing the overall effect of sample prediction.
8. The machine learning multi-model fusion method for predicting the yield of Maotai-flavor liquor base wine according to claim 7, characterized in that: In step seven, the fusion model is input to return the predicted value, mainly by loading the previously saved trained fusion model (StackingRegressor) and standardization tool (StandardScaler), and then accepting a set of feature inputs (such as QU-Moisture, JP-Temperature, etc.), standardizing the input features, and using the model to predict the production of liquor, and finally returning and outputting the predicted results.
Citation Information
Patent Citations
Prediction method for fermentation yield of white spirit
CN115423142A
Wine brewing process parameter optimization method based on SHAP value
CN117252467A