## 4 Natural Crack Recognition Algorithm Based on Neural Networks
Figure 14 illustrates the Latin Hypercube sampling of ten samples in a two-dimensional space, where the process initially determines in which combined interval each sample falls before specifying the sample's exact location within that interval. An enhanced random evolutionary algorithm optimizes the specific positioning of sample points to achieve \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Number** & **Crack Depth (mm)** & \(V_{\text{RA (mV)}}\) & \(V_{\text{FA (mV)}}\) & **Number** & **Crack Depth (mm)** & \(V_{\text{RA (mV)}}\) & \(V_{\text{FA (mV)}}\) \\ \hline
1 & 1.00 & 170.7156 & 78.9432 & 12 & 1.55 & 172.9197 & 90.7492 \\
2 & 1.05 & 170.4283 & 78.3336 & 13 & 1.60 & 172.4400 & 99.9376 \\
3 & 1.10 & 170.1408 & 77.7240 & 14 & 1.65 & 173.3024 & 110.6996 \\
4 & 1.15 & 167.6382 & 78.1812 & 15 & 1.70 & 174.1644 & 116.4616 \\
5 & 1.20 & 161.1356 & 78.6384 & 16 & 1.75 & 176.6132 & 123.2932 \\
6 & 1.25 & 163.0384 & 79.5529 & 17 & 1.80 & 181.0620 & 130.1248 \\
7 & 1.30 & 165.7340 & 80.4672 & 18 & 1.85 & 184.3914 & 136.1569 \\
8 & 1.35 & 167.5542 & 80.8228 & 19 & 1.90 & 187.7208 & 140.1888 \\
9 & 1.40 & 169.3744 & 81.1784 & 20 & 1.95 & 190.954 & 142.6732 \\
10 & 1.45 & 171.3864 & 83.8892 & 21 & 2.00 & 191.1880 & 147.5576 \\
11 & 1.50 & 173.3980 & 85.6008 & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Fatigue natural crack simulation data for the neural network. Figure 13: Neural network weight optimization based on GA.  
optimal Latin Hypercube sampling. Figure 14a predominantly shows sample distribution in the lower-left and upper-right corners, with no points in the upper-left and lower-right corners. However, the ten sample points of the optimized Latin Hypercube sampling are uniformly distributed across the two-dimensional sample space after optimization, as shown as in Figure 14b. In GA, the two most crucial parameters that require repeated adjustment are the crossover probability \(P_{c}\) and mutation probability \(P_{m}\), which directly influence the optimal weight values in the neural network prediction model. This paper adopts the concept of orthogonal experiments, dividing the crossover probability into three levels: 0.4, 0.65, and 0.9, and the mutation probability is similarly divided into three levels: 0.001, 0.01, and 0.1, resulting in nine combinations. The prediction results are shown in Table 7.  
By cross-comparing the results in Table 7, it can be seen that the minimum relative errors are 3.03%, 4.21%, and 3.03%, respectively, when the baseline is at different values. And it can be found that \(P_{m}\) is set to 0.65 and \(P_{c}\) to 0.01 in all of these combinations. Under this condition, the BPNN achieves the highest prediction accuracy. Consequently, we adopt this set of weights as the neural network's weights to finalize the predictive model and proceed to validate it using a set of validation samples. The validation results are presented in Table 8.  
Compared with the results in Table 4, in which the average relative error is 3.73%, the relative error for natural cracks is 2.19% by using the optimized neural network algorithm shown in Table 8. The result indicated that the proposed GA-based BPNN can great improve the characterization accuracy for the natural crack. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multicolumn{2}{c}{**Probability Parameters**} & \multirow{2}{*}{**Baseline**} & \multirow{2}{*}{**Prediction**} & \multirow{2}{*}{**Relative Error (\%)**} \\ \(P_{m}\) & \(P_{c}\) & & & \\ \hline \multirow{4}{*}{0.4} & 0.001 & & 1.0945 & 8.79 \\  & 0.01 & & 1.1363 & 5.31 \\  & 0.01 & & 1.1098 & 7.52 \\  & 0.001 & & 1.1319 & 5.68 \\
0.65 & 0.01 & 1.2 & 1.1637 & 3.03 \\  & 0.1 & & 1.1471 & 4.41 \\  & 0.001 & & 1.0741 & 10.50 \\
0.9 & 0.01 & & 1.1071 & 7.74 \\  & 0.1 & & 1.1325 & 5.63 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Orthogonal experiment results. Figure 14: Comparison of initial population probability distribution and optimal Latin Hypercube distribution. (**a**) Before; (**b**) after.