# Ultra-High-Cycle Fatigue Life Prediction of Metallic Materials Based on Machine Learning
## 2 Database and Machine Learning Algorithms
### Machine Learning Algorithms  
Artificial neural networks are inspired by brain perceptual processing. Computational algorithms are used to simulate brain neurons and allow models to learn autonomously to solve different types of problems [30]. Gradient boosting is a powerful machine-learning technique [31]. The main idea of this algorithm is to cascade the level of learners and use the errors of the previous learner for reinforcement in the current learner. The overall model error gets gradually reduced, and the improvement of model accuracy is eventually achieved. The specific implementation process is divided into four steps. Total data set \(S=\{(x_{1},y_{1}),\)\((x_{2},y_{2}),\)\(\dots,\)\((x_{n},y_{n})\}\). The loss function is \(L\)\((y,f\)\((x))\). The nodes of the regression tree are \(J\). Partition the input space into \(j\) disjoint regions (\(R_{1},\)\(R_{2},\)\(\dots,\)\(R_{j}\)). Estimate a constant value for each region \(b_{j}\). The regression tree equations are as  
\[g_{m}(x)=\sum_{j=1}^{j}\left(b_{j}k\right),x\subset R_{j} \tag{1}\] \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Materials** & **Machine Model** &
\begin{tabular}{c} **Loading** \\ **Frequency** \\ \end{tabular} & **Stress Ratio** & **Number of Data** & **References** \\ \hline TC32 titanium alloy & USF-2000 & \(20\,\mathrm{kHz}\) & \(-1\) & \(10\) & Literature [20] \\ X80 acicular ferrite & USE-2000 & \(20\,\mathrm{kHz}\) & \(-1\) & \(8\) & Literature [21] \\ T60 titanium alloy & Self-developed & \(20\,\mathrm{kHz}\) & \(-1\) & \(6\) & Literature [22] \\ TCI1 titanium alloy & Unknown & \(20\,\mathrm{kHz}\) & \(-1\) & \(10\) & Literature [23] \\ GH4169 alloy & USF-300 & \(20\,\mathrm{kHz}\) & \(-1\) & \(8\) & Literature [24] \\
54 SiCrV6 steel & USF-2000 & \(20\,\mathrm{kHz}\) & \(-1\) & \(13\) & Literature [25] \\ ZK60 magnesium alloy & USF-2000 & \(20\,\mathrm{kHz}\) & \(-1\) & \(9\) & Literature [26] \\ AA2198-T8 aluminum alloy & USF-2000 & \(20\,\mathrm{kHz}\) & \(-1\) & \(8\) & Literature [27] \\ Ti-6A1-4V titanium alloy & Unknown & \(20\,\mathrm{kHz}\) & \(-1\) & \(7\) & Literature [28] \\
16 MnR steel & Unknown & \(20\,\mathrm{kHz}\) & \(-1\) & \(5\) & Literature [29] \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Training database. Figure 1: S-N curves of the eleven alloys used in the dataset. \[k(x\subset R_{j})=\left\{ \begin{array}{l}1,x\subset R_{j}\\ 0,x\
ot\subset R_{j}\end{array} \right. \tag{2}\]  
1. Initialize the model by \[f_{0}(x)=\underset{c}{\text{argmin}}\sum_{i=1}^{n}L(y_{i},c)\] (3)
2. Calculate the residuals by \[r_{im}=-\left[\frac{\partial L(y_{i},f_{m-1}(x_{i})}{\partial f_{m-1}(x_{i})} \right]_{f(x)=f_{i-1}(x)}\] (4) where \(m\) and \(t\) denote number of samples and iterations. 3. Calculate the step size of gradient descent by \[c_{m}=\underset{i=1}{\text{argmin}}\sum_{i=1}^{n}L(y_{i},f_{m-1}(x_{i})+cg_{m} (x_{i}))\] (5)
4. Update model by \[f_{m}(x)=f_{m-1}(x)+Lr\times c_{m}g_{m}(x)\] (6) where \(Lr\) denotes learning rate. The random forest algorithm has gained much attention in different industries due to its efficiency and accuracy [32]. The core idea of this technique is to select the output results of several weak classifiers by voting to form a strong classifier. RF is a begging integration model, and it can be divided into three phases. 1. Sampling with put-back is performed on samples (one sample is selected randomly each time). The selected N number of samples is then used to train a decision tree as samples at the root node of the decision tree. \(N\) subsets of samples are obtained, denoted as \(N_{i}\) (\(i\) = 1, 2,..., \(k\)). 2. Each sample has M attributes. When each node of the decision tree needs to be split, m attributes are randomly selected from these M attributes to satisfy the following condition: m\(<\)M. One attribute is then selected from these m attributes as the splitting attribute for that node.