An interpretable creep rupture life prediction method based on machine learning and SHAP values
Patent Information
- Application Number
- CN202310767414.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-27
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-06-27
AI Technical Summary
[0004]本发明的目的在于克服上述现有技术的缺点,提供一种基于机器学习和SHAP值的可解释蠕变断裂寿命预测方法,以解决传统的蠕变寿命预测实验方法难以充分考虑各个因素对蠕变寿命影响的问题,使得预测率不高
[0032]本发明公开了一种基于机器学习和SHAP值的可解释蠕变断裂寿命预测方法,该方法通过实验和文献资料广泛收集材料的蠕变断裂寿命数据集,考虑了材料化学成分、材料微观组织、制备加工参数和环境因素等不同输入特征对蠕变寿命预测模型的影响,通过SHAP方法计算各个输入特征对模型结果的边际贡献,从而能够解释不同特征对蠕变寿命的影响程度。同时,本发明中基于SHAP值和前向搜索法的特征筛选步骤,将筛选出的最优输入特征集合输入到基于机器学习的蠕变寿命预测模型中,不仅降低了模型的冗余程度,降低寿命预测的时间和经济成本,提高了模型的计算效率,而且增强了模型的预测精度,而且能够解释各输入变量对蠕变断裂寿命的贡献。
Smart Images

Figure CN116842834B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of material life prediction and relates to an interpretable creep fracture life prediction method based on machine learning and SHAP values. Background Technology
[0002] Modern process equipment, such as reactors, heat exchangers, and pressure pipelines, is widely used in energy, chemical, and metallurgical industries, and the service environments faced by its materials are becoming increasingly complex. In addition to bearing the loads of equipment start-up, shutdown, and steady-state operation, critical components also face harsh high-temperature environments. Under prolonged load and high temperature, numerous creep pores will form within the material. The growth and aggregation of these creep pores will lead to creep cracks, ultimately resulting in creep fracture failure. Therefore, establishing reliable creep fracture life prediction methods for materials facing long-term high-temperature service environments, and accurately and efficiently predicting the creep fracture life of materials, is of great significance for ensuring the safety and reliability of high-temperature process equipment.
[0003] Traditional methods for predicting creep fracture life mainly include time-temperature-parameter methods based on extrapolation from tardive testing results, such as the Larson-Miller parametric method, and life extrapolation methods based on creep curves, such as the θ projection method. However, these traditional methods all require conducting creep experiments in the laboratory and obtaining accelerated creep test data to estimate the long-term creep fracture life of materials, thus consuming a significant amount of time and economic resources. Furthermore, traditional creep fracture life prediction methods cannot fully consider the influence of material chemical composition, heat treatment, and other factors on creep life, thus limiting their widespread application in engineering. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide an interpretable creep fracture life prediction method based on machine learning and SHAP values. This solves the problem that traditional creep life prediction experimental methods cannot fully consider the influence of various factors on creep life, resulting in low prediction rates.
[0005] To achieve the above objectives, the present invention employs the following technical solution:
[0006] An interpretable creep fracture life prediction method based on machine learning and SHAP values includes the following steps:
[0007] Step 1: Divide the data set into a training set and a test set. Each data set includes several input features and one output feature.
[0008] Step 2: Using the training set as input data, train the creep fracture life prediction model through the extreme gradient boosting algorithm, and calculate the SHAP value of each input feature based on the training results; sort the input features in descending order of SHAP value.
[0009] Step 3 includes the following sub-steps:
[0010] Step 3.1: Select the input feature with the largest SHAP value to form the input feature set, train the creep fracture life prediction model, and obtain the relative root mean square error;
[0011] Step 3.2: Using the forward search method, each time select an input feature from the remaining input features and add it to the previous input feature set. Train the creep fracture life prediction model through the extreme gradient enhancement algorithm and calculate the relative root mean square error.
[0012] Step 3.3, repeat step 3.2 until all input features have been selected and calculated and then stop;
[0013] Step 3.4: Select the input feature set that minimizes the relative root mean square error as the optimal feature set;
[0014] Step 4: Using the optimal feature set and training data, construct a machine learning model to predict creep life, and optimize the parameters to obtain the final creep life fracture model.
[0015] A further improvement of the present invention is that:
[0016] Preferably, in step 1, the input features include material chemical composition, microstructure parameters, manufacturing process parameters, and environmental impact parameters; the output feature is logarithmic creep fracture life.
[0017] Preferably, the microstructure parameters include grain size, inclusion size, annealing time, and material form.
[0018] Preferably, the environmental impact parameters include experimental stress and experimental temperature.
[0019] Preferably, in step 2, the SHAP value φ of each input feature i The calculation formula is:
[0020]
[0021] Where M represents the number of input features, This represents the set of all permutations of M features. Let f represent the set of all features preceding feature k in permutation R. x (S)=E[f(X)|X s=x S ] represents the conditional expectation given a known feature subset S.
[0022] Preferably, in steps 3.1 and 3.2, the relative root mean square error (RRMSE) is... Train for:
[0023]
[0024] Where n is the number of data samples in the training set, y i It is the true value of the logarithmic lifetime of creep fracture in the training set, f(x) i ) is the predicted value of the logarithmic lifetime of creep rupture.
[0025] Preferably, in step 4, a machine learning model for predicting creep life is constructed using an extreme gradient enhancement algorithm.
[0026] Preferably, in step 4, the parameters are optimized using ten-fold cross-validation and grid search methods.
[0027] Preferably, in step 4, based on the test set, the predicted creep life is obtained through the final predicted creep life fracture model, and the relative root mean square error (RRMSE) of the test set is calculated using the creep life. Test Relative root mean square error (RRMSE) Test The smaller the value, the higher the prediction accuracy.
[0028] Preferably, the relative root mean square error RRMSE Test The calculation formula is:
[0029]
[0030] Where n' is the number of data samples in the test set, y j It is the true value of the logarithmic lifetime of the test set creep fracture, f(x) j ) is the predicted value of the logarithmic lifetime of creep rupture.
[0031] Compared with the prior art, the present invention has the following beneficial effects:
[0032] This invention discloses an interpretable creep fracture life prediction method based on machine learning and SHAP values. This method extensively collects creep fracture life datasets of materials through experiments and literature, considering the influence of different input features such as material chemical composition, microstructure, processing parameters, and environmental factors on the creep life prediction model. The SHAP method is used to calculate the marginal contribution of each input feature to the model results, thereby explaining the degree of influence of different features on creep life. Furthermore, the feature selection step based on SHAP values and forward search in this invention inputs the optimal set of selected input features into the machine learning-based creep life prediction model. This not only reduces model redundancy, lowers the time and economic costs of life prediction, and improves the model's computational efficiency, but also enhances the model's prediction accuracy and explains the contribution of each input variable to creep fracture life. Attached Figure Description
[0033] Figure 1 This is a flowchart of an interpretable creep fracture life prediction method based on machine learning and SHAP values according to the present invention.
[0034] Figure 2 This is a sorted graph of the SHAP values of all input feature variables in the training set samples in this invention;
[0035] Figure 3 This is a diagram showing the optimal feature selection results obtained by the present invention based on SHAP values and forward search method;
[0036] Figure 4 This is a comparison chart of the predicted and actual values of the creep logarithmic lifetime obtained by the creep fracture lifetime prediction model based on machine learning using test set data in this invention, as well as the calculation results of the relative root mean square error.
[0037] Figure 5 This is a comparison chart of the predicted and actual creep life values obtained by the creep fracture life prediction model based on machine learning using test set data in this invention, under a 2x error dispersion band. Detailed Implementation
[0038] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0039] This invention first obtains creep life data sets through experiments and literature, randomly dividing them into training and test sets. The input features for each data set include material chemical composition, microstructure parameters, processing parameters, and environmental parameters, with the output variable being the logarithmic creep life. Using the training set data, a creep fracture life prediction model is trained using machine learning methods. The SHAP values of all sample input features are calculated, and the importance of each feature and its impact on the prediction results are analyzed. Next, based on the SHAP values, a forward search method is used to select the optimal feature set from the input feature set. Then, the selected optimal features are used to construct a machine learning model for predicting creep life, and the model parameters and structure are optimized. Finally, based on the data of the optimal input features in the test set, the optimized model is used to predict creep fracture life, and the model accuracy is evaluated. The advantage of this invention is that the SHAP method can explain the marginal contribution of each input feature to the model results. Furthermore, the optimal input feature selection step based on SHAP values and the forward search method in this invention not only reduces model redundancy and improves computational efficiency but also enhances the model's prediction accuracy.
[0040] See Figure 1 This invention provides an interpretable creep fracture life prediction method based on machine learning and SHAP values, specifically including the following steps:
[0041] S1: Dataset Construction: Obtain creep life data sets and randomly divide them into 80% training set and 20% test set. The input feature set for each data set includes features such as material chemical composition, microstructure parameters, manufacturing process parameters and environmental impact parameters. The output variable is the creep logarithmic lifetime. Normalize both the input data and the output variable.
[0042] The creep life dataset constructed in step S1 has several input features and one output variable (logarithmic creep fracture life). The input features include the mass fraction of the material's chemical composition, microstructure parameters, manufacturing process parameters, and environmental impact parameters. Among them, the chemical composition includes several chemical elements such as C, Mn, P, S, Ni, Si, Cr, Mo, N, Al, V, and Nb. The microstructure factors include grain size, inclusion size, lattice constant, and stacking fault energy. The manufacturing process parameters include normalizing temperature, normalizing time, annealing temperature, annealing time, and material form. The environmental impact parameters include experimental stress and experimental temperature.
[0043] The material forms in step S1 include several forms such as tubes, plates, and pipes, which are represented by numbers such as 1, 2, and 3 in the dataset.
[0044] S2: SHAP Value Calculation: Using normalized training set data, a machine learning model for predicting creep fracture life is trained. The SHAP values of all sample input features are calculated, and the importance of each feature and its impact on the prediction results are analyzed. Specific steps include:
[0045] S21: Using all sample input features in the training set as input data, the creep fracture life prediction model is trained using the XGBoost algorithm (eXtreme Gradient Boosting) in machine learning. The prediction model trained by this algorithm has higher prediction accuracy and more accurate prediction results in the final model.
[0046] S22: Based on the model training results of step S21, calculate the SHAP values of all sample input features in the training set, sort the input features in descending order of SHAP values, and analyze the importance of each input feature and its impact on the model results.
[0047] For each sample, the SHAP value φ of each input feature k is calculated. i :
[0048]
[0049] Where M represents the number of input features, This represents the set of all permutations of M features. Let f represent the set of all features preceding feature k in permutation R. x (S)=E[f(X)|X s =x S ] represents the conditional expectation given a known feature subset S.
[0050] Based on the calculated SHAP value of each input feature, the contribution of each feature to the model prediction results can be analyzed, and it can be explained whether the influence of each feature on creep life is consistent with physical laws.
[0051] S3: Feature Selection: Based on the SHAP value results, a forward search method is used to select the optimal feature set from the input feature set; specifically, this includes the following steps:
[0052] S31: Based on the SHAP value results in step S22, first select the feature with the largest SHAP value as the input feature set, use the XGBoost algorithm to train the creep fracture life prediction model, and calculate the relative root mean square error (RRMSE) of the model to evaluate the model performance.
[0053] S32: Following the SHAP values from high to low in step S22, a forward search method is used to incrementally select one of the remaining unselected input features and add it to the input feature set. The XGBoost algorithm and the same model parameters are used to train the model, and the relative root mean square error (RRMSE) used for training is calculated. Train Repeat this process until all features have been selected, then stop.
[0054] The relative root mean square error (RRMSE) used for training Train for:
[0055]
[0056] Where n is the number of data samples in the training set, y i It is the true value of the logarithmic lifetime of creep fracture in the training set, f(x) i ) is the predicted value of the logarithmic lifetime of creep rupture.
[0057] S33: Based on the results of step S32, select the relative root mean square error (RRMSE). Train The input feature set corresponding to the minimum value is the optimal feature set.
[0058] S4: Model Building: Utilize the selected optimal features to build a machine learning model for predicting creep life, and optimize the model parameters and structure;
[0059] Using the selected optimal feature set and training data, a machine learning model for predicting creep life is constructed using the XGBoost algorithm. Ten-fold cross-validation and grid search methods are used to seek the optimal hyperparameters of the prediction model to optimize the model structure.
[0060] S5: Model Evaluation: Based on the data of the optimal input features in the test set, evaluate the accuracy of the finally established creep fracture life prediction model.
[0061] Using the optimized creep fracture life prediction model and data with the optimal input features in the test set, the predicted value of the logarithmic creep fracture life is obtained and compared with the corresponding true value. The relative root mean square error (RRMSE) of the creep fracture life prediction model used in the test set is calculated. Test At the same time, a 2x lifetime dispersion band was plotted to verify the accuracy of the model's prediction results.
[0062] The relative root mean square error (RRMSE) used for testing Test for:
[0063]
[0064] Where n' is the number of data samples in the test set, yj It is the true value of the logarithmic lifetime of the test set creep fracture, f(x) j ) is the predicted value of the logarithmic lifetime of creep rupture.
[0065] The following is a further explanation with reference to specific embodiments:
[0066] Example 1
[0067] Please see Figure 1 This invention provides an interpretable creep fracture life prediction method based on machine learning and SHAP values, specifically including the following steps:
[0068] Step S1: Obtain creep life data sets through experiments and literature. The input features of each data set include material chemical composition, processing parameters and environmental parameters, and the output variable is the logarithmic creep life. Normalize both the input data and the output variable. Randomly divide the dataset into 80% training set and 20% test set.
[0069] In this embodiment, the material used is 9Cr1MoVNb steel, and the constructed dataset contains 503 sets of training set sample data and 125 sets of test set data.
[0070] The creep life dataset constructed in step S1 has 18 input features, including 11 material chemical composition mass fractions, 5 manufacturing process parameters, and 2 environmental impact parameters. Among them, the chemical composition includes 11 elements such as C, Mn, P, S, Ni, Cr, Mo, N, Al, V, and Nb. The manufacturing process parameters include 5 parameters such as normalizing temperature, normalizing time, annealing temperature, annealing time, and material form. The environmental impact parameters include experimental stress and experimental temperature. The material form includes 3 forms such as tube, plate, and pipe, which are replaced by 0, 1, and 2 respectively in the original dataset.
[0071] Step S2: Using the normalized training set data, train a model for predicting creep fracture life using machine learning methods, calculate the SHAP value of all sample input features, and analyze the importance of each feature and its impact on the prediction results.
[0072] Step S2 specifically includes:
[0073] Step S21: Use the input features of all samples in the training set as input data, and train the creep fracture life prediction model using the XGBoost algorithm in machine learning.
[0074] Step S22: Based on the model training results of step S21, calculate the SHAP value of all sample input features in the training set, sort the input features in descending order of SHAP value, and analyze the importance of each feature and its impact on the model results.
[0075] For each sample, the SHAP value φ of each input feature k is calculated. i :
[0076]
[0077] Where M represents the number of input features, This represents the set of all permutations of M features. f represents the set of all features preceding feature k in permutation R. x (S)=E[f(X)|X s =x S ] represents the conditional expectation given a known subset S of features. Based on the calculated SHAP value of each input feature, the contribution of each feature to the model prediction results can be analyzed, and it can be explained whether the influence of each feature on creep life is consistent with physical laws.
[0078] Figure 2 The SHAP values of all input features are presented. A higher SHAP value indicates a greater contribution of that feature to the creep life prediction model and a greater impact on the accuracy of life prediction. Figure 2 The results show that two environmental parameters (experimental stress and experimental temperature) have the greatest impact on the prediction model, far exceeding the influence of material chemical composition and heat treatment parameters, while V and Cr element content rank third and fourth, respectively. Generally, the higher the experimental stress and the higher the service temperature, the shorter the creep rupture life of the material. The addition of trace elements V and Cr has a significant impact on enhancing the high-temperature mechanical properties of 9Cr1Mo steel, especially V, which can effectively improve the high-temperature creep strength and creep resistance of the steel. Therefore, the calculated SHAP value in this embodiment is consistent with physical laws, demonstrating the contribution or importance of each feature to the creep life prediction model.
[0079] Step S3: Based on the SHAP value results, use the forward search method to select the optimal feature set from the input feature set.
[0080] Step S3 specifically includes:
[0081] Step S31: Based on the SHAP value results in step S22, first select the feature with the largest SHAP value as the input feature set, use the XGBoost algorithm to train the creep fracture life prediction model, and calculate the relative root mean square error (RRMSE) of the model to evaluate the model performance.
[0082] Step S32: Following the SHAP values from high to low in step S22, a forward search method is used to incrementally select one of the remaining unselected input features and add it to the input feature set. The XGBoost algorithm and the same model parameters are used to train the model, and the relative root mean square error (RRMSE) is calculated. Train Repeat this process until all features have been selected, then stop.
[0083] Step S33: Based on the results of step S32, select the relative root mean square error (RRMSE). Train The input feature set corresponding to the minimum value is the optimal feature set.
[0084] The RRMSE mentioned Train for:
[0085]
[0086] Where n is the number of data samples in the training set, y i It is the true value of the logarithmic lifetime of creep fracture in the training set, f(x) i ) is the predicted value of the logarithmic lifetime of creep rupture.
[0087] Figure 3 This embodiment presents the feature selection results obtained using the XGBoost algorithm and forward search method based on the SHAP value. When the number of input features is 9, the relative root mean square error (RRMSE) of the model is... Train The accuracy reached a minimum of 0.0902%, indicating the highest model accuracy at this point. Therefore, nine features were selected as the optimal input feature set: experimental stress, experimental temperature, V, Cr, normalizing temperature, N, Mn, S, and Nb.
[0088] Step S4: Model Building: Utilize the selected optimal features to build a machine learning model for predicting creep life, and optimize the model parameters and structure;
[0089] Specifically, step S4 includes: using the selected optimal feature set (i.e., experimental stress, experimental temperature, V, Cr, normalizing temperature, N, Mn, S, and Nb), and training set data, constructing a machine learning model for predicting creep life using the XGBoost algorithm; using ten-fold cross-validation and grid search methods to seek the optimal hyperparameters of the prediction model to optimize the model structure; the optimized model kernel function and hyperparameter results are shown in Table 1.
[0090] Table 1: Hyperparameter optimization results of XGBoost model
[0091]
[0092] Step S5: Evaluate the accuracy of the finally established creep fracture life prediction model based on the data of the optimal input features in the test set.
[0093] Step S5 specifically includes: using the optimized creep fracture life prediction model, and employing data with the optimal input features in the test set (i.e., experimental stress, experimental temperature, V, Cr, normalizing temperature, N, Mn, S, and Nb), obtaining the predicted value of the logarithmic creep fracture life, and comparing it with the corresponding true value; calculating the relative root mean square error (RRMSE) of the creep fracture life prediction model in the test set. Test At the same time, a dispersion band with a lifetime of 2 times was calculated to verify the accuracy of the model's prediction results.
[0094] The relative root mean square error (RRMSE) Test for:
[0095]
[0096] Where n' is the number of data samples in the test set, y j It is the true value of the logarithmic lifetime of the test set creep fracture, f(x) j This is the predicted logarithmic lifetime at creep rupture. The relative root mean square error (RRMSE) is also mentioned. Test The smaller the value, the higher the prediction accuracy.
[0097] Through this embodiment, the following prediction results can be obtained:
[0098] Figure 4 A comparison chart of the predicted and actual creep logarithmic lifetime values obtained from a machine learning-based creep fracture lifetime prediction model using test set data is presented, along with the calculated relative root mean square error (RRMSE). The chart shows that the data points are generally close to the 45° dashed line, indicating that the predicted and actual creep lifetime values are very close. The relative root mean square error (RRMSE) of the prediction results is also presented. Test The value is only 0.0457, indicating that the constructed creep life prediction model has high prediction accuracy.
[0099] Figure 5 This figure presents a comparison between the predicted and actual creep life values obtained from the machine learning-based creep fracture life prediction model using test set data, within a 2x error dispersion band. It can be seen that the vast majority of data points lie within the 2x error dispersion band, indicating that the constructed machine learning-based creep fracture life prediction model can accurately predict and assess the creep life of materials.
[0100] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for predicting interpretable creep fracture life based on machine learning and SHAP values, characterized in that, Includes the following steps: Step 1: Divide the data set into a training set and a test set. Each data set includes several input features and one output feature. In step 1, the input features include material chemical composition, microstructure parameters, manufacturing process parameters, and environmental impact parameters; the output feature is logarithmic creep fracture life. Step 2: Using the training set as input data, train the creep fracture life prediction model through the extreme gradient boosting algorithm, and calculate the SHAP value of each input feature based on the training results; sort the input features in descending order of SHAP value. Step 3 includes the following sub-steps: Step 3.1: Select the input feature with the largest SHAP value to form the input feature set, train the creep fracture life prediction model, and obtain the relative root mean square error; Step 3.2: Using the forward search method, each time select an input feature from the remaining input features and add it to the previous input feature set. Train the creep fracture life prediction model through the extreme gradient enhancement algorithm and calculate the relative root mean square error. Step 3.3, repeat step 3.2 until all input features have been selected and calculated and then stop; Step 3.4: Select the input feature set that minimizes the relative root mean square error as the optimal feature set; Step 4: Using the optimal feature set and training data, construct a machine learning model to predict creep life, and obtain the final creep life fracture model after optimizing the parameters.
2. The interpretable creep fracture life prediction method based on machine learning and SHAP values according to claim 1, characterized in that, The microstructure parameters include grain size, inclusion size, annealing time, and material form.
3. The interpretable creep fracture life prediction method based on machine learning and SHAP values according to claim 1, characterized in that, The environmental impact parameters include experimental stress and experimental temperature.
4. The interpretable creep fracture life prediction method based on machine learning and SHAP values according to claim 1, characterized in that, In step 2, the SHAP value of each input feature The calculation formula is: (1) in, M Indicates the number of input features. express M The set consisting of all permutations of a feature Indicates in arrangement R All in the features k The set of features from before, Represents a known feature subset S The expected value under the given conditions.
5. The interpretable creep fracture life prediction method based on machine learning and SHAP values according to claim 1, characterized in that, In steps 3.1 and 3.2, the relative root mean square error RRMSE Train for: (2) in, n It is the number of data samples in the training set. It is the true value of the logarithmic creep fracture lifetime in the training set. It is a predicted value for logarithmic creep fracture life.
6. The interpretable creep fracture life prediction method based on machine learning and SHAP values according to claim 1, characterized in that, In step 4, a machine learning model for predicting creep life is constructed using the extreme gradient enhancement algorithm.
7. The interpretable creep fracture life prediction method based on machine learning and SHAP values according to claim 1, characterized in that, In step 4, the parameters are optimized using 10-fold cross-validation and grid search methods.
8. The interpretable creep fracture life prediction method based on machine learning and SHAP values according to any one of claims 1-7, characterized in that, In step 4, based on the test set, the predicted creep life is obtained through the final predicted creep life fracture model, and the relative root mean square error of the test set is calculated using the creep life. RRMSE Test Relative root mean square error RRMSE Test The smaller the value, the higher the prediction accuracy.
9. The interpretable creep fracture life prediction method based on machine learning and SHAP values according to claim 8, characterized in that, The relative root mean square error RRMSE Test The calculation formula is: (3) in, It is the number of data samples in the test set. It is the true value of the logarithmic creep fracture life in the test set. It is a predicted value for logarithmic creep fracture life.
Citation Information
Patent Citations
Aero-engine combustion chamber creep fatigue life prediction method
CN113569504A
Materials chemistries and microtopographies and uses thereof
WO2021161290A1