# Machine Learning-Based Prediction and Optimisation System for Laser Shock Peening
## 5 Results and Discussion  
### Generalisation Ability and Relevance of Input Parameters  
The ANN model performance was evaluated using scatterplots showing the measured and predicted data using independent training and test datasets (see Figure 7). The datapoints displayed as squares and circles signify the residual stress measurements at a point (network outputs) in multiple samples at different depths in the longitudinal and transverse directions. The training data (75% of the partitioned experimental data) are shown on the left-hand plots, and the test data (25%) are shown on the right-hand plots for dataset 1 (Figure 7a,b) and dataset 2 (Figure 7c,d). It is often appropriate to evaluate the fitting uncertainty of the predictive model using the training data, whereas test data scatterplots can provide a reliable estimate of the generalisation ability of the network. Despite the underlying difference in the peening patterns, the ANN model is able to predict the residual stresses in both datasets with relatively few outlier points as demonstrated in the test data results (see Figure 7b,d).  
[PERSON]'s algorithm is an effective method to illuminate the 'black box' architecture of the neural network by providing more explanatory insight into the contributions of the input parameters. In LSP research, there is consensus that the process variables have a significant influence on the resulting residual stress distribution. However, a quantitative estimate of the relative contribution of process parameters based on measured residual stress data has not yet been reported. The results showing the relative importance (\(RI\)) of input variables using [PERSON]'s algorithm are presented in Figure 8. In dataset 1, power density was the most dominant parameter, with a relative importance close to 40% \(RI\), followed by spot size (\(\sim\)33%) and number of layers (\(\sim\)28%). However, in dataset 2, the effect of spot diameter was more predominant, with an \(RI\)-38%, followed by number of layers  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Number of chromosomes & 10 \\ Crossover rate & 0.8 \\ Mutation rate & 0.3 \\ Termination error & 0.001 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Parameters of GA model used for optimisation studies.  
(-34%) and offset distance (27%). As envisaged, all the input parameters from both datasets had a substantial influence on the predicted residual stresses. However, it is considered beneficial if the relevance of the input parameters can be quantitatively determined, as the parameters having low relevance can then be eliminated from subsequent prediction models and design of experiments. Second, the process variables that show higher relevance can be closely monitored to achieve the desired goals during peening, for example, maximum compressive stresses on the surface.  
Figure 8: Relative importance (\(RI\)) of inputs for the predicted residual stresses using the ANN model using [PERSON]’s algorithm for (**a**) single-shot laser peening data (dataset 1) and (**b**) multiple-shot laser peening data with overlap (dataset 2).  
Figure 7: Comparison of predicted and measured residual stresses in longitudinal (datapoint denoted as square) and transverse (datapoint denoted as circle) directions with linear fitting for (**a**) training data and (**b**) test data using single-shot laser peening data (dataset 1), as well as (**c**) training data and (**d**) test data using multiple-shot laser peening data with overlap (dataset 2).