## 3 Fatigue Life Prediction Modeling
### Modeling Process
#### 3.3.2 Determine the Hyperparameters of the ANN Model  
1. Iteration times:  
In order to test the prediction performance for 100, 500, 800, 1000, and 1200 iterations, the data with 500 times augmented were used for training, the source data were used for testing. The training of the model is essentially the process of adjusting the connection weights between neural units. The initial values of these weights are randomized. With each iteration of the model, the optimization algorithm of the model adjusts the values \begin{table}
\begin{tabular}{l c} \hline \hline
**Hyperparameters** & **Values** \\ \hline Number of neurons in the input layer & 24 \\ Hidden layers & 80, 40 \\ Learning rate & 0.001 \\ Activation function & tanh \\ Iteration times & 1000 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Hyperparameters used by the ANN model. Figure 4: Comparison of prediction accuracy and training time of models with different augmentation multiples: (**a**) stage of training; (**b**) stage of testing; (**c**) time-consuming. of the weights backward according to the difference between the output value given by the model and the actual value during the iteration, finally minimizing the difference [44]. Therefore, the appropriate number of iterations is a key factor that affects the prediction accuracy of the model. In the experiment, except for the number of iterations, other model parameters remain unchanged. Figure 5 shows the results of model prediction accuracy evaluation for different iteration times. To clearly characterize the resulting data of 10 independent repetitions of the experiment, the successive results of the test set are represented as box plots. The box plot shows not only the trend of the evaluation indexes with the number of iterations but also the distribution of all the results in the 10 repeated experiments more effectively. The horizontal line in the middle of the box plot represents the median value of the 10 data, and the outermost horizontal line represents the maximum and minimum values of the data. From the results of the iterative experiments, we found that the RMSE and MAE evaluation indexes of the test set of the model both gradually decrease, and the R\({}^{2}\) index gradually increases as the number of iterations increases, which indicates that the prediction accuracy of the model is gradually improving as the number of iterations increases. It is proved that a higher number of iterations has a positive impact on the model performance. However, after reaching 800 iterations, the indexes of the test set fluctuated steadily. It indicated that the model has achieved good results. The higher the number of iterations, the longer it takes. Therefore, 800 is the best number of iterations. 2. Hidden layers:  
As the number of hidden layers increases, more weights and biases are involved in the nonlinear computation of the data inside the model. Then, it can better fit the data nonlinearly. However, as the model structure becomes more complex, the training time of the model also increases. What is more, an overly complex model causes overfitting, and too many hidden layers also cause the optimization of the model to stagnate at a local optimum point [45], which cannot further improve the accuracy of the model. Therefore, a reasonable number of hidden layers is crucial for prediction effectiveness. In order to select an optimal choice of the number of hidden layers, all the model parameters were kept constant except for the four hidden layers which were set to 1, 2, 3, and 4. All the 500 times augmented data were used as training data, real experimental data were used as test data, and the number of iterations was fixed to 800 times. Figure 6 shows the trends of RMSE and MAE evaluation indexes when the hidden layers are different. The closer to 0, the higher the model accuracy is.