We have employed interpretable methods to uncover the black-box model of the machine learning (ML) for predicting the maximum pitting depth (dmax) of oil and gas pipelines. Ensemble learning (EL) is found to have higher accuracy compared with several classical ML models, and the determination coefficient of the adaptive boosting (AdaBoost) model reaches 0.96 after optimizing the features and hyperparameters. In this work, the running framework of the model was clearly displayed by visualization tool, and Shapley Additive exPlanations (SHAP) values were used to visually interpret the model locally and globally to help understand the predictive logic and the contribution of features. Furthermore, the accumulated local effect (ALE) successfully explains how the features affect the corrosion depth and interact with one another.
The local corrosion behavior and mechanism of Ni–P coatings in a 3.5 wt% sodium chloride solution with different flow speeds (0 m s−1, 0.5 m s−1, 1 m s−1) were investigated through a wire beam electrode (WBE) with morphological, elemental and electrochemical analyses as well as numerical simulations. It was found that the microstructure of the Ni–P coating was in the shape of broccoli and possessed satisfactory compactness and uniformity. The numerical simulations showed that the speed increased and the static pressure decreased at the local area. Combined with WBE, it was found that the average corrosion potential decreased at that area. The results indicated that the corrosion tendency and corrosion rate of the Ni–P coating were larger at higher speeds, and the corrosion resistance could be improved by the electroless Ni–P coating. WBE was helpful in revealing the local electrochemical information of the Ni–P coating.