Stud low cycle fatigue life prediction methodTechnical Field
The invention relates to the technical field of bridge engineering, in particular to a method for predicting the low cycle fatigue life of a stud.
Background
The stud is used as a key force transmission element of the steel-concrete composite structure, and the fatigue performance of the stud directly influences the service safety and service life of the bridge structure. Under the dynamic stress effects of vehicle load, earthquake and the like, the stud is always subjected to high-frequency and high-amplitude cyclic stress, and the low-cycle fatigue failure is a key cause for damage and even collapse of a bridge structure. The traditional stud fatigue life prediction method mainly relies on three technical means of push-out tests, finite element numerical simulation and an empirical formula method.
The experimental test method adopts a high-frequency fatigue testing machine to apply cyclic load to the stud test piece, monitors crack initiation and propagation processes through strain gauges, and finally counts failure cycle times. Although the method has higher reliability, the method has the problems of high single test cost (about tens of thousands yuan), long period (usually more than 1 month) and difficulty in simulating the coupling action of complex environments. The finite element simulation method establishes a stud refined three-dimensional model based on software such as ABAQUS and the like, and combines a Miner linear accumulated damage theory to predict service life. The method is limited by the sensitivity of model parameters (such as more than 20% of prediction deviation caused by friction coefficient errors), and the calculation takes tens of hours, so that the engineering rapid evaluation requirement cannot be met. The AASHTO standard formula method adopts an empirical correction coefficient method to estimate the fatigue life of the stud, and the simplified formula does not consider key factors such as material microstructure degradation, load spectrum non-stationarity and the like, so that the prediction error is larger in heavy-load traffic or earthquake-fatigue coupling scenes.
Therefore, a method for predicting the low cycle fatigue life of a peg is provided.
Disclosure of Invention
The invention aims to provide a stud low cycle fatigue life prediction method for solving the problems in the background technology.
In order to solve the technical problems, the invention provides the following technical scheme that the method for predicting the low cycle fatigue life of the stud comprises the following steps:
S1, establishing an original data set, wherein the original data set comprises a plurality of input features and a short-cycle fatigue life of the stud, the plurality of input features are independent variables, and the short-cycle fatigue life of the stud is an output quantity;
S2, carrying out data standardization processing and feature screening on a plurality of input features in an original data set to obtain an original data set after feature screening;
s3, dividing the original data set subjected to feature screening into a training set and a testing set;
S4, constructing a multi-model prediction model based on a linear regression model, a tree model integration model, a gradient lifting model, a probability modeling model and a kernel function model by using the training set;
S5, using the test set, searching optimal parameters by adopting a five-fold cross validation and grid search method, and testing the reliability of the multi-model prediction model until the prediction precision and the training time reach preset conditions to obtain optimal model integration;
S6, dynamically adjusting each model weight in the optimal model integration, fusing each model weight, and constructing a weighted voting mechanism to obtain an integrated model;
s7, predicting the low cycle fatigue life of the target stud by using the integrated model;
s8, introducing a SHAP interpretation tool to explain the prediction result of the integrated model in detail.
According to the above technical scheme, in the step S1, the plurality of input features include three types, namely a load parameter, a material parameter and a geometric parameter;
The load parameters comprise a loading value P, a stress amplitude delta tau, a maximum stress taumax, a minimum stress taumin and an average stress taumean;
The material parameters comprise concrete strength fc and peg tensile strength fu;
The geometric parameter includes the peg diameter d.
According to the above technical solution, in S2,
The method for carrying out data standardization processing on a plurality of input features adopts Z-score standardization to eliminate dimension differences, and the formula is as follows:
Wherein mu is the mean value of the original data, sigma is the standard value of the original data, xnorm is the standardized data, the mean value of xnorm is 0, and the standard deviation is 1;
The feature screening method for the input features comprises the step of screening feature variables through Spearman rank correlation coefficients, wherein the formula is as follows:
wherein di is the rank difference of the ith sample on the two variables, n is the total number of samples, ρ is the sign of the correlation coefficient, and represents the strength and direction of rank correlation between the two variables, and the value ranges from-1 to 1.
According to the above technical solution, in S4, the specific steps for constructing the multi-model prediction model are as follows:
S4.1, training a linear regression model:
The linear mapping relation between the load parameter and the low cycle fatigue life of the stud is established through a least square method, and the model expression of the linear regression model is as follows:
Nf=β0+β1Δτ+β2τmax+ò
Wherein Nf is fatigue life, beta0 is intercept term, beta1、β2 is regression coefficient of stress amplitude delta tau and maximum stress taumax, and co is random error term;
Quantizing the linear contributions of a plurality of input features through betai coefficients, providing a datum reference for a subsequent nonlinear model, and analyzing a solution form:
Wherein X is a design matrix, y is an observation lifetime vector,A coefficient vector estimated for least squares;
S4.2, training a tree model integration model:
The decision tree regression model is characterized in that a recursive bipartite strategy is adopted, stress amplitude delta tau and peg tensile strength fu are used as key splitting characteristics, a single decision tree is constructed according to a nonlinear relation of the stress amplitude delta tau and the peg tensile strength fu, zero-order nonlinear fitting is realized through local mean prediction, and the splitting threshold optimization problem has the analytical formula:
where j is the current split feature, s is the split threshold, RL,RR is the left and right sub-regions after splitting,As the average value of the service lives of the samples in the left and right subareas, yi is the real service life of the ith sample;
The random forest model integrates a plurality of decision trees, reduces variance by randomly selecting a characteristic subspace and a sample subset, and enhances generalization capability, and the expression is as follows:
Wherein, theFor inputting an average predicted value of x, B is the number of decision trees, Tb is a predicted function of a B-th tree, and x is an input feature vector;
Introducing extra randomness on feature splitting points and sample sampling to improve model diversity, wherein the expression is as follows:
ξj~U(min(xj,max(xj))
Where ζj represents the random splitting threshold of feature j and u represents a uniform distribution;
s4.3, training a gradient lifting model:
And (3) gradient lifting the tree model, namely training a plurality of weak learners through iteration, gradually optimizing a prediction result, fitting the model of each step with the residual error of the previous step, carrying out residual error calculation through the gradient direction of a loss function, correcting the prediction deviation, and finally combining all weak models into a strong prediction model by weighting, wherein the formulas are as follows:
Loss function:
Wherein L is a loss function, and is used for measuring the difference between a predicted value and a true value of a model, Y is a true label of a sample, F (x) is a predicted value of the model on input x, and x is an input feature vector;
residual calculation (step t):
Where ri,t is the residual of the ith sample at step t; Is the partial derivative of the loss function with respect to the model, which represents the change rate of the loss function along with the predicted value, Ft-1(xi is the predicted value of the model of the previous step (the t-1 step) on the sample xi, and xi is the input feature vector of the i-th sample;
Model update (learning rate η): Ft(x)=Ft-1(x)+η·ht (x)
Wherein Ft (x) is the predicted value of the model of the t step on the input x, eta is the learning rate, and ht (x) is the predicted value of the t decision tree on the input x;
introducing regularization (L1/L2) and second-order Taylor expansion to prevent overfitting, supporting parallel calculation and missing value processing, wherein the formula is as follows:
Where L is the overall objective function of the model, L (yi,F(xi)) is the loss function value of the ith sample, the prediction error of the model F (xi) to the true value yi is measured, yi is the true label or target value of the ith sample, F (xi) is the predicted value of the model to the ith sample xi, xi is the input feature vector of the ith sample, Ω (Fk) is the regularization term of the kth tree for controlling the complexity of the model, and Fk is the kth decision tree;
s4.4, training a probability modeling model:
constructing a kernel function mapping nonlinear relation to provide prediction uncertainty assessment, wherein the formula is as follows:
Wherein k (xi,xj) is the kernel function value between the inputs xi and xj, measuring the similarity between them, sigma2 is the signal variance, controlling the magnitude of the function, l is the length scale, controlling the smoothness of the function variation;
The Bayes regression model is used for outputting confidence intervals of the stud low-cycle fatigue life prediction based on posterior distribution of the Bayes theorem quantization model parameters, and the formulas are as follows:
posterior distribution, assuming Gaussian a priori β -N (0, Σ)
Wherein P (beta|y, X) refers to posterior probability distribution of model parameter beta under the condition of given data y and X, beta is parameter vector of model, y is observed target vector, X is input characteristic matrix, P (y|X, beta) refers to probability of observed target value y under the condition of given characteristic vector X and parameter beta, P (beta) refers to prior probability distribution of parameter beta, P (y|X) refers to probability of observed target value y under the condition of given characteristic X;
N (0, sigma) is a Gaussian distribution with a mean value of 0 and a covariance matrix of Sigma;
Is the mean value ofThe covariance matrix is the Gaussian distribution of A-1; is the posterior mean, typically the maximum posterior estimate of the parameter, A-1 is the inverse of the posterior covariance matrix;
s4.5, training a kernel function model:
Mapping data to a high-dimensional space through a kernel function, and fitting the data in an epsilon-sensitive band, wherein the formula is as follows:
problem optimization:
Wherein w is a model weight vector, C is a regularization parameter, and is used for controlling punishment degree of training error, ζi,Is a relaxation variable which represents the training error of the upper and lower boundaries of sample i, respectively;
Constraint conditions:
Wherein yi is the true target value for the ith sample; b is a bias term of the model, epsilon is the width of the insensitive band, and represents that the error in the epsilon range does not account for loss;
the predictive equation:
wherein f (x) is a predicted value of the model, alphai,Is a Lagrangian multiplier corresponding to the upper and lower constraint boundaries of sample i, K (xi, x) is a kernel function.
According to the above technical scheme, the specific steps of S5 are as follows:
using the test set, defining a hyper-parameter space to generate all parameter combinations through grid search, training and evaluating each model through five-fold cross validation (K=5), searching the optimal parameters, and testing the reliability of the multi-model prediction model until the prediction precision and the training time reach preset conditions, so as to obtain the optimal model integration;
Assume a hyper-parameter set:
the search space is the cartesian product of all the hyper-parameters combined:
Θ=Θ1×Θ2×…×Θk
The optimal parameter θ* is chosen such that the model evaluation index F (θ) is maximized:
θ*=argmaxF(θ)(θ∈Θ)
Wherein, theta1、Θ2、Θk respectively represents the value sets of the first, second and Kth super parameters, theta is the searching space of the super parameters and comprises all possible super parameter combinations, theta* is the optimal super parameter combination, F (theta) is the evaluation index of the model under the super parameter combination theta;
the method is characterized in that the optimal model integration is evaluated by taking Root Mean Square Error (RMSE), average absolute percentage error (MAPE) and decision coefficient R2 as evaluation indexes, and the formula is as follows:
Where yi is the actual value,Is the predicted value, n is the sample size,Is the average of the actual values.
According to the above technical scheme, the specific steps of S6 are as follows:
S6.1, generating a plurality of decision trees through a random forest model, and extracting feature importance weights, wherein the formula is as follows:
Wherein the splitting characteristic in the Sf node is a set of f, and delta immunity (S) is the reduction of the purity of the split node S;
the feature importance is then normalized, normalizing the feature importance weight wf to [0,1], with the formula:
wherein, importance (f) is the Importance of the feature f, T is the total number of decision trees, the split feature in the Sf node is the set of f, and DeltaImmunity (S) is the reduction of the impure degree after the split of the node S;
wf is the Importance weight of the normalized feature F, F is the total feature number, and Importance (j) represents the unnormalized Importance of the j-th feature;
S6.2, carrying out gradient lifting on the input features based on an extreme gradient lifting tree model, and dynamically adjusting sample weights;
firstly, sample weight calculation is carried out, the weight Si of the sample i is determined by the weighted sum of all the characteristics, and the formula is as follows:
Wherein Si is the weight of the ith sample, wf is the normalized weight of the feature f, from the calculation result of S6.1, uf is the mean value of the feature f, and |xi,f-μf | is the degree of deviation of the measurement sample i on the feature f;
Secondly, introducing sample weight Si into an objective function of the extreme gradient lifting tree model, wherein the formula is as follows:
Wherein L is a model overall objective function after introducing sample weight;
s6.3, fusing the feature importance weight of the random forest model with the sample weight of the extreme gradient lifting tree model, constructing a weighted voting mechanism, generating a final prediction result, and obtaining an integrated model, wherein the fusion formula is as follows:
Wherein, theIs the initial predictor of the random forest model for the input feature x,The method is characterized in that the method is a residual error predicted by an extreme gradient lifting tree model, and alpha is a weight super parameter used for controlling the contribution ratio of the initial prediction of a random forest model and the residual error correction of the extreme gradient lifting tree model.
According to the above technical scheme, the specific steps of S8 are as follows:
s8.1, adopting KERNEL SHAP algorithm in SHAP framework, approximating Shapley value by weighted linear regression, calculating marginal contribution of each input feature to predicted value, and defining kernel function as follows for the stud life prediction model:
Where N is the set of all input features, S is the subset of features that does not contain input feature i,Is the SHAP value of the input feature i, and f (S) is the predicted output of the model given the feature subset S;
S8.2, calculating the importance of the input features, and calculating the average contribution degree of each input feature to life prediction based on the global interpretation of SHAP values;
S8.3, local decision analysis is carried out, and the prediction result is comprehensively analyzed by analyzing the comprehensive influence of a plurality of input features.
Compared with the prior art, the invention has the following beneficial effects:
(1) The machine learning algorithm solves the problems of long time consumption, high labor intensity, low prediction precision and the like of the traditional test, saves the test cost and shortens the research and development period;
(2) XGBoost and RF integration, significantly improving the prediction accuracy while still maintaining accuracy at small sample sizes;
(3) The appearance of SHAP meets the requirement of model interpretation, and solves the problem that the decision process is difficult to understand due to the complexity and black box property of the model;
(4) Through accurate prediction, avoid excessive design, thereby material saving realizes reducing the energy consumption, early warning in advance to high risk peg simultaneously, avoids the emergence of catastrophic accident.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention. In the drawings:
FIG. 1 is a technical flow chart of the present invention;
FIG. 2 is a correlation thermodynamic diagram of the present invention;
FIG. 3 is a graph of integrated model comparison results of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1-3, the invention provides a method for predicting the low cycle fatigue life of a peg, comprising the following steps:
S1, establishing an original data set, wherein the original data set comprises a plurality of input features and a short-cycle fatigue life of the stud, the plurality of input features are independent variables, and the short-cycle fatigue life of the stud is an output quantity;
The input characteristics comprise three types, namely a load parameter, a material parameter and a geometric parameter, wherein the load parameter comprises a load value P, a stress amplitude delta tau, a maximum stress taumax, a minimum stress taumin and an average stress taumean, the material parameter comprises concrete strength fc and stud tensile strength fu, and the geometric parameter comprises stud diameter d;
S2, carrying out data standardization processing and feature screening on a plurality of input features in the original data set to obtain an original data set subjected to feature screening;
the method for carrying out data standardization processing on a plurality of input features adopts Z-score standardization to eliminate dimension differences, and the formula is as follows:
Wherein mu is the mean value of the original data, sigma is the standard value of the original data, xnorm is the standardized data, the mean value of xnorm is 0, and the standard deviation is 1;
The feature screening method for the input features is to screen feature variables through Spearman rank correlation coefficients, wherein Spearman rank correlation coefficients are non-parametric statistical methods used for measuring monotone correlation between two variables, and the formula is as follows:
Wherein di is the rank difference of the ith sample on two variables, n is the total number of samples, ρ is the sign of the correlation coefficient, the strength and direction of rank correlation between the two variables are represented, and the value ranges from-1 to 1;
as shown in fig. 2, determining the tensile strength of the peg, the maximum stress value of the individual peg and the stress amplitude as core input characteristic variables according to the degree of correlation;
s3, dividing the original data set subjected to feature screening into a training set and a testing set;
S4, constructing a multi-model prediction model based on a linear regression model, a tree model integration model, a gradient lifting model, a probability modeling model and a kernel function model by using a training set, and systematically capturing complex mapping relations between the fatigue life of the stud and stress parameters and material characteristics through the synergistic effect of five methods of the linear regression model, the tree model integration model, the gradient lifting model, the probability modeling model and the kernel function model. Each model forms complementary advantages in terms of prediction accuracy, robustness and interpretability;
s4.1 training a linear regression model (LR):
The linear mapping relation between load parameters (such as stress amplitude and maximum stress) and the low-cycle fatigue life of the stud is established through a least square method, and the model expression of the linear regression model is as follows:
Nf=β0+β1Δτ+β2τmax+ò
Wherein Nf is fatigue life, beta0 is intercept term, beta1、β2 is regression coefficient of stress amplitude delta tau and maximum stress taumax, and co is random error term;
quantizing the linear contributions of a plurality of input features through betai coefficients, providing a base reference for a subsequent nonlinear model, and analyzing a solution form:
Wherein X is a design matrix, y is an observation lifetime vector,A coefficient vector estimated for least squares;
S4.2, training a tree model integration model:
A decision tree regression model (DTR) is used for constructing a single decision tree based on the nonlinear relation between stress amplitude and material strength and providing local feature importance assessment, wherein a recursive bipartite strategy is adopted, the stress amplitude delta tau and the stud tensile strength fu are used as key splitting features, the nonlinear relation is used for constructing the single decision tree, zero-order nonlinear fitting is realized through local mean value prediction, and the resolution formula of the splitting threshold optimization problem is as follows:
where j is the current split feature, s is the split threshold, RL,RR is the left and right sub-regions after splitting,As the average value of the service lives of the samples in the left and right subareas, yi is the real service life of the ith sample;
the random forest model (RF) integrates a plurality of decision trees, reduces variance by randomly selecting a feature subspace and a sample subset, and enhances generalization capability, and the expression is as follows:
Wherein, theFor inputting an average predicted value of x, B is the number of decision trees, Tb is a predicted function of a B-th tree, and x is an input feature vector;
An extreme random tree model (Extra Trees) is characterized in that Extra randomness is introduced to characteristic splitting points and sample samples, so that model diversity is improved, and the expression is as follows:
ξj~U(min(xj,max(xj))
Where ζj represents the random splitting threshold of feature j and u represents a uniform distribution;
s4.3, training a gradient lifting model:
The gradient lifting tree model (GBDT) is characterized in that a plurality of weak learners are trained in an iterative mode, prediction results are optimized gradually, the model of each step fits the residual error of the previous step, residual error calculation is carried out through the gradient direction of a loss function, prediction deviation is corrected, and finally all weak models are weighted and combined into a strong prediction model, wherein the formula is as follows:
Loss function:
Wherein L is a loss function, and is used for measuring the difference between a predicted value and a true value of a model, Y is a true label of a sample, F (x) is a predicted value of the model on input x, and x is an input feature vector;
residual calculation (step t):
Where ri,t is the residual of the ith sample at step t; Is the partial derivative of the loss function with respect to the model, which represents the change rate of the loss function along with the predicted value, Ft-1(xi is the predicted value of the model of the previous step (the t-1 step) on the sample xi, and xi is the input feature vector of the i-th sample;
Model update (learning rate η): Ft(x)=Ft-1(x)+η·ht (x)
Wherein Ft (x) is the predicted value of the model of the t step on the input x, eta is the learning rate, and ht (x) is the predicted value of the t decision tree on the input x;
the extreme gradient lifting tree model (XGBoost) introduces regularization (L1/L2), second order Taylor expansion to prevent overfitting, and supports parallel computation and missing value processing, and the formula is:
Where L is the overall objective function of the model, L (yi,F(xi)) is the loss function value of the ith sample, the prediction error of the model F (xi) to the true value yi is measured, yi is the true label or target value of the ith sample, F (xi) is the predicted value of the model to the ith sample xi, xi is the input feature vector of the ith sample, Ω (Fk) is the regularization term of the kth tree for controlling the complexity of the model, and Fk is the kth decision tree;
s4.4, training a probability modeling model:
gaussian Process Regression (GPR), which is a Bayesian She Sifei parameter regression method, is used for regression and uncertainty estimation by constructing a kernel function mapping nonlinear relation and providing prediction uncertainty estimation, and has the following formula:
Wherein k (xi,xj) is the kernel function value between the inputs xi and xj, measuring the similarity between them, sigma2 is the signal variance, controlling the magnitude of the function, l is the length scale, controlling the smoothness of the function variation;
The Bayes regression model is used for outputting confidence intervals of the stud low-cycle fatigue life prediction based on posterior distribution of the Bayes theorem quantization model parameters, and the formulas are as follows:
posterior distribution, assuming Gaussian a priori β -N (0, Σ)
Wherein P (beta|y, X) refers to posterior probability distribution of model parameter beta under the condition of given data y and X, beta is parameter vector of model, y is observed target vector, X is input characteristic matrix, P (y|x, beta) refers to probability of observed target value y under the condition of given characteristic vector X and parameter beta, P (beta) refers to prior probability distribution of parameter beta, P (y|X) refers to probability of observed target value y under the condition of given characteristic X;
N (0, sigma) is a Gaussian distribution with a mean value of 0 and a covariance matrix of Sigma;
Is the mean value ofThe covariance matrix is the Gaussian distribution of A-1; is the posterior mean, typically the maximum posterior estimate of the parameter, A-1 is the inverse of the posterior covariance matrix;
s4.5, training a kernel function model, wherein a polynomial kernel function (poly) is adopted as a kernel function of a support vector machine (SVR), flexible nonlinear fitting capability is provided, and the method is suitable for the change of data under different scales:
Mapping data to a high-dimensional space through a kernel function, and fitting the data in an epsilon-sensitive band, wherein the formula is as follows:
problem optimization:
Wherein w is a model weight vector, C is a regularization parameter, and is used for controlling punishment degree of training error, ζi,Is a relaxation variable which represents the training error of the upper and lower boundaries of sample i, respectively;
Constraint conditions:
Wherein yi is the true target value for the ith sample; b is a bias term of the model, epsilon is the width of the insensitive band, and represents that the error in the epsilon range does not account for loss;
the predictive equation:
wherein f (x) is a predicted value of the model, alphai,Is a Lagrangian multiplier corresponding to the upper and lower constraint boundaries of sample i, K (xi, x) is a kernel function;
s5, using a test set, defining a hyper-parameter space to generate all parameter combinations through grid search, training and evaluating each model through five-fold cross validation (K=5), searching optimal parameters, and testing the reliability of the multi-model prediction model until the prediction precision and training time reach preset conditions, so as to obtain optimal model integration;
Assume a hyper-parameter set:
the search space is the cartesian product of all the hyper-parameters combined:
Θ=Θ1×Θ2×…×Θk
The optimal parameter θ* is chosen such that the model evaluation index F (θ) is maximized:
θ*=arg max F(θ)(θ∈Θ)
Wherein Θ1、Θ2、Θk represents the value set of the first, second and Kth super parameters respectively, Θ is the searching space of the super parameters and comprises all possible super parameter combinations, θ* is the optimal super parameter combination, and F (θ) is the evaluation index of the model under the super parameter combination θ;
The method is characterized in that the Root Mean Square Error (RMSE), the average absolute percentage error (MAPE) and the decision coefficient R2 are used as evaluation indexes to evaluate the integration of the optimal model, and the formula is as follows:
Where yi is the actual value,Is the predicted value, n is the sample size,Is the average of the actual values;
The results of the operation are shown in the following table:
As can be seen intuitively from the table, the RMSE value of RF is minimum, the R2 value is maximum, the MAPE value of XGBoost is minimum, overall, the performance of RF, XGBoost and DTR models is relatively good;
S6, dynamically adjusting each model weight in the optimal model integration, fusing each model weight, and constructing a weighted voting mechanism to obtain an integrated model;
Aiming at the problems of high overfitting risk, insufficient generalization capability, low feature utilization rate and the like of the existing single model in a complex data scene, a hybrid integration framework for fusing the advantages of a random forest model and an extreme gradient lifting tree model is provided, and the sample sampling weight of the extreme gradient lifting tree model is adjusted according to the feature importance of the random forest;
S6.1, generating a plurality of decision trees through a random forest model, and extracting feature importance weights, wherein the formula is as follows:
Wherein the splitting characteristic in the Sf node is a set of f, and delta immunity (S) is the reduction of the purity of the split node S;
the feature importance is then normalized, normalizing the feature importance weight wf to [0,1], with the formula:
wherein, importance (f) is the Importance of the feature f, T is the total number of decision trees, the split feature in the Sf node is the set of f, and DeltaImmunity (S) is the reduction of the impure degree after the split of the node S;
wf is the Importance weight of the normalized feature F, F is the total feature number, and Importance (j) represents the unnormalized Importance of the j-th feature;
S6.2, carrying out gradient lifting on the input features based on an extreme gradient lifting tree model, and dynamically adjusting sample weights;
firstly, sample weight calculation is carried out, the weight Si of the sample i is determined by the weighted sum of all the characteristics, and the formula is as follows:
Wherein Si is the weight of the ith sample, wf is the normalized weight of the feature f, from the calculation result of S6.1, uf is the mean value of the feature f, and |xi,f-μf | is the degree of deviation of the measurement sample i on the feature f;
Secondly, introducing sample weight Si into an objective function of the extreme gradient lifting tree model, wherein the formula is as follows:
Wherein L is a model overall objective function after introducing sample weight;
s6.3, fusing the feature importance weight of the random forest model with the sample weight of the extreme gradient lifting tree model, constructing a weighted voting mechanism, generating a final prediction result, and obtaining an integrated model, wherein the fusion formula is as follows:
Wherein, theIs the initial predictor of the random forest model for the input feature x,The method is characterized in that the method is a residual error predicted by an extreme gradient lifting tree model, and alpha is a weight super parameter used for controlling the contribution ratio of the initial prediction of a random forest model and the residual error correction of the extreme gradient lifting tree model;
As shown in fig. 3, the integrated model is plotted against the predicted results of XGBoost and RF, respectively;
compared with XGBoost model and RF model, the predicted point of the integrated model is more concentrated near the ideal predicted line, three performance indexes are all improved, and specific values are shown in the following table:
From the above table, it can be seen that the integrated model achieved a 14.83% reduction and a 7.32% improvement in RMSE and R2, respectively, compared to the XGBoost model, and a 8.91%, 6.57% reduction and a 2.66% improvement in MAPE, RMSE, R2, respectively, compared to the RF model.
S7, predicting the low cycle fatigue life of the target stud by using the integrated model;
s8, introducing an interpretability analysis framework based on SHAPLEY ADDITIVE exPlanations (SHAP) aiming at the black box decision problem caused by complexity of a machine learning model in the prior art, and realizing visualization and physical mechanism mapping of a prediction result by quantifying marginal contribution of characteristics to model output;
introducing an SHAP interpretation tool to explain the prediction result of the integrated model in detail;
s8.1, adopting KERNEL SHAP algorithm in SHAP framework, approximating Shapley value by weighted linear regression, calculating marginal contribution of each input feature to predicted value, and defining kernel function as follows for the stud life prediction model:
Where N is the set of all input features, S is the subset of features that does not contain input feature i,Is the SHAP value of the input feature i, and f (S) is the predicted output of the model given the feature subset S;
S8.2, calculating the importance of the input features, such as a summary graph and a sketch graph, and calculating the average contribution degree of each input feature to life prediction based on the global interpretation of SHAP values;
s8.3, local decision analysis is carried out, and the prediction result is comprehensively analyzed through analyzing the comprehensive influence of a plurality of input features, such as a dependency graph.
It should be noted that the above-mentioned embodiments are merely preferred embodiments of the present invention, and the present invention is not limited thereto, but may be modified or substituted for some of the technical features thereof by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.