# Prediction of Corroded Pipeline Failure Pressure Based on Empirical Knowledge and Machine Learning
## 4 Result and Discussion  
In this study, we examined four classical empirical formulas, namely, ASME B31G, Modified ASME B31G, PCORRC Criteria, and DNV RP-F101, to determine the most suitable one for our dataset. Figure 2 illustrates the coefficients of determination (R\({}^{2}\)) between the predicted failure pressures and the actual failure pressures for each of these formulas on the training dataset. Among them, (a) DNV RP-F101 exhibited the best predictive performance with an R\({}^{2}\) value of 0.8844. This indicates a strong correlation between the predicted and actual failure pressures for this formula. The next best performance was observed with (c) PCORRC Criteria, which had an R\({}^{2}\) value of 0.8721, suggesting a slightly lower but still substantial correlation. The Modified ASME B31G, represented by (b), achieved an R\({}^{2}\) value of 0.8303, indicating a good but less accurate fit compared to the first two formulas. Finally, the original ASME B31G, shown in (d), had the lowest R\({}^{2}\) value of 0.6309, indicating a weaker correlation between the predicted and actual failure pressures. Based on theseresults, we concluded that DNV RP-F101 is the most appropriate empirical formula for our dataset due to its superior predictive accuracy. To compare the impact of different loss functions on the optimization of neural networks, this study trained three distinct neural network models using the loss functions defined in Equations (8)-(10). Specifically, Equation (8) represents a loss function supervised by actual failure pressure, which relies solely on the observed failure pressure data to guide the training process. Equation (9) builds upon this foundation by incorporating an empirical formula-induced term, meaning that the loss is calculated directly by comparing the predicted failure pressure with the empirical formula. In contrast, Equation (10) introduces an additional term predicted by the neural network itself, which aims to compensate for the deficiencies of the empirical formula. Figure 3a presents the variation of the loss functions for each model during the training process as a function of the number of iterations. All models tend to converge around 120 epochs. However, the model trained with Equation (9) converged a final loss value that is significantly higher than those of the other two models, indicating a less efficient optimization outcome. Figure 3b illustrates the variation of the loss function during the validation process. In the initial 100 epochs, the loss function exhibited significant oscillations for all models. The model trained with Equation (8) demonstrated a relatively slow convergence rate, eventually stabilizing around the 120 th epoch. In contrast, the models using Equations (9) and (10) converged more rapidly, reaching stability around the 80 th epoch. Notably, the model trained with Equation (9) achieves a final loss value that is higher than those of the other two models, which is consistent with the training results. Figure 2: Coefficient of determination between actual failure pressure and predicted failure pressure from empirical formulas. To validate the performance of the models, this paper statistically analyzed the prediction errors of the models. Figure 4 presents the three types of statistical errors for each model in the form of bar charts with data distributions. Specifically, Figure 4a shows the absolute percentage error (_APE_) of the predictions, which reflects the proportion of prediction errors relative to the true values. Figure 4b illustrates the absolute error (_AE_), indicating the magnitude of the deviation between the predicted and actual values. Figure 4c displays the squared error (_SE_), which highlights samples with large prediction errors. The numbers on top of the bars represent the average values of the respective bars, with (a), (b), and (c) corresponding to the mean absolute percentage error (_MAPE_), mean absolute error (_MAE_), and mean squared error (_MSE_), respectively. The values in parentheses are the standard deviations.