## 3 Case Analysis of Storage Tank Leakage Accidents
### Application of the Proposed Method
#### 3.2.4 Hyperparameter Tuning  
In order to improve the model's performance and avoid overfitting, this study uses a combination of grid search and cross-validation methods to tune the key hyperparameters of the ANN. The tuning process mainly focuses on the following hyperparameters: learning rate, batch size, and L2 regularization weight (weight decay). During the hyperparameter tuning process, we first defined a grid containing multiple possible values. Specifically, the following hyperparameter ranges were set: learning rate: 0.001, 0.01, 0.1; batch size: 32, 64, 128; L2 regularization weight: 0, 0.001. Through grid search, we systematically explored these hyperparameter combinations and trained and evaluated the model for each hyperparameter configuration. To further validate the generalization ability of each hyperparameter combination, we used 5-fold cross-validation. In cross-validation, the dataset was divided into 5 subsets, with 4 subsets used for training and 1 subset used for validation, repeating 5 times. By using cross-validation, we were able to assess the performance of each hyperparameter combination under different data splits, ensuring the stability and robustness of the model. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  & **X1** & **X2** & **X3** & **X4** & **X5** & \(\dots\) & **X22** & **Top** \\ \hline
1 & 0.02917 & 0.02156 & 0.01009 & 0.03362 & 0.02359 & \(\dots\) & 0.03085 & 0.04612 \\
2 & 0.03005 & 0.0213 & 0.00835 & 0.03534 & 0.02773 & \(\dots\) & 0.0286 & 0.04213 \\
3 & 0.03027 & 0.0229 & 0.00872 & 0.03603 & 0.02701 & \(\dots\) & 0.0282 & 0.04402 \\
4 & 0.02674 & 0.01959 & 0.00951 & 0.03768 & 0.02849 & \(\dots\) & 0.02826 & 0.04523 \\
5 & 0.02758 & 0.02291 & 0.00912 & 0.03509 & 0.02379 & \(\dots\) & 0.03226 & 0.0423 \\ \(\dots\) & \(\dots\) & \(\dots\) & \(\dots\) & \(\dots\) & \(\dots\) & \(\dots\) & \(\dots\) \\
999 & 0.03057 & 0.01906 & 0.0093 & 0.03808 & 0.02518 & \(\dots\) & 0.03139 & 0.04613 \\
1000 & 0.02688 & 0.02097 & 0.00843 & 0.03176 & 0.02443 & \(\dots\) & 0.02854 & 0.04320 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Failure probability extension of basic events in DFT. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Data** & **Top** & **X1** & **X2** & **X3** & **X4** & \(\dots\) & **X21** & **X22** \\ \hline
1 & \(4.7\times 10^{-5}\) & \(8.1\times 10^{-5}\) & \(5.7\times 10^{-5}\) & \(2.5\times 10^{-5}\) & \(9.6\times 10^{-5}\) & \(\dots\) & \(3.3\times 10^{-5}\) & \(8.4\times 10^{-5}\) \\
2 & \(9.5\times 10^{-5}\)After grid search and cross-validation, the best hyperparameter combination was determined: learning rate (lr) = 0.1, batch size (batch_size) = 64, L2 regularization weight (weight_decay) = 0.001. For this combination, the average mean squared error (MSE) in cross-validation was 2.381 \(\times\) 10\({}^{-6}\), demonstrating strong performance and generalization ability. Through hyperparameter tuning, the model's performance was significantly improved. The best hyperparameter combination outperformed other combinations on both the training and testing datasets and avoided overfitting. This result demonstrates that through systematic hyperparameter optimization, we can effectively improve the model's accuracy and generalization ability. Similarly, to improve the performance of the LSTM model and avoid overfitting, this study tuned the key hyperparameters of the LSTM model. The tuning process mainly focused on the following hyperparameters: learning rate, batch size, LSTM hidden layer size (hidden size), number of LSTM layers (num layers), and dropout rate (dropout). During the hyperparameter tuning process, a grid containing multiple possible values was defined. The following hyperparameter ranges were specifically set: learning rate: 0.001, 0.01, 0.1; batch size: 32, 64, 128; L2 regularization weight: 0, 0.1, 0.001, 0.0005; number of LSTM layers (num layers): 2, 3, 4, 5; dropout rate: 0.1, 0.2, 0.3.