## Methods and Materials
### Methods
#### 2.1.3 SHAP Value Evaluation of Interpretability  
Shapley Additive Explanation (SHAP) is an additive explanation model that draws inspiration from cooperative game theory and can provide detailed interpretations of the output of any machine learning model. In SHAP, all input features of a machine learning model are seen as \"contributors\" to the final prediction and are assessed based on their individual impact on the output [38, 39]. The SHAP value is the value that is assigned to each feature in the instance, quantifying the contribution of the feature to the predicted outcome. In the case of the integrated tree model [40], used for classification tasks, the model produces a probability value as its output, which is to calculate the Shapley value of each feature. For Shapley value, its calculation method is as follows:  
\[\varnothing_{j}=\sum_{S\subseteq(x_{1},\ldots,x_{M})\setminus x_{j}}\frac{|S|! (M-|S|-1)!}{M!}\big{[}f\big{(}S\cup x_{j}\big{)}-f(S)\big{]} \tag{3}\]  
So as to measure the influence of the feature on the final output value formulation:  
\[f(x)=g(z)=\varnothing_{0}+\sum_{j=1}^{M}\varnothing_{j}z_{j}\, \tag{4}\]  
\[z\in\{0,1\}^{M} \tag{5}\]  
In this Formulas (3)-(5), \(x_{j}\) represents the \(j\)-th feature of sample \(x\), \(\varnothing_{j}\) is the attribution value (Shapley value) of each feature, \(S\) is a subset of the feature, \(M\) denotes the number of input features, and \(z\) represents whether or not the corresponding feature exists (with 1 indicating its presence and 0 indicating its absence; such as text, after the word one-hot, all words will not appear in a sentence); \(\varnothing_{0}\) is a constant. For each project sample in the dataset, the SHAP model generates a result that measures the impact of the sample on the entire model. The calculation method used for SHAP values is comparable to that of linear models. SHAP considers the \(i\)-th sample in a dataset, which we denote as \(\mathsf{x_{i}}\). Suppose that this sample has \(\mathsf{j}\) features, with the value of the \(j\)-th feature being \(x_{i,j}\). Additionally, assume that the machine learning model applied to this dataset generates a predicted value of \(\mathsf{y_{i}}\) for the \(i\)-th sample. To calculate the SHAP value for this sample, SHAP starts by establishing a baseline score for the model, usually defined as the average value of the target variable across all samples and denoted as \(y_{\textit{hase}}\). The SHAP value for the \(j\)-th feature  
Figure 2: Flow chart of the Random Forest model construction. of the \(i\)-th sample can then be calculated using the following equation, which quantifies the contribution of that feature to the difference between the predicted value and the baseline:  
\[y_{i}=y_{base}+f(x_{i,1})+f(x_{i,2})+\ldots\ldots+f\big{(}x_{i,j}\big{)} \tag{6}\]  
The SHAP value for a given instance \(x_{i}\) and feature 1 is denoted as \(f(x_{i,1})\). This value represents the extent to which the feature contributes to the final predicted value \(y_{i}\) for that instance. If \(f(x_{i,1})\) is positive, it indicates that the feature has a positive effect on the prediction and improves its accuracy. Conversely, if \(f(x_{i,1})\) is negative, the feature has a counterproductive effect on the prediction and reduces its accuracy. The input to Tree SHAP is a tree-based machine learning model that has been trained using input data X. By utilizing this trained model along with the input data; Tree SHAP can generate an N \(\times\) M matrix of SHAP values. Each value in this matrix represents the contribution of a specific feature to the prediction of a corresponding instance. This section discusses how input instance vectors are related to their corresponding predictions in the context of black box machine learning algorithms used in prognostics modeling. Black box models do not rely on explicit causal relationships between inputs and predictions.