# Causes of Multi-Mechanism Abnormal Formation Pressure in Offshore Oil and Gas Wells
## 4 Analysis of Abnormal Formation Pressure Mechanisms
As shown in Figure 11, Categories 1, 4, and 5 are on the left and right sides below the normal trend line, deviating towards the lower values of velocity and density relative to the normal compaction trend section of this depth range but still distributed around the loading curve or having a similar trend to the loading curve, and their abnormal causes correspond to undercompaction; Category 3 is slightly below the normal trend line, relatively concentrated near the unloading curve of this depth range, and its abnormal cause corresponds to hydrothermal pressure increase; Categories 0 and 2 are above the normal trend line, similar to the opposite process of fluid expansion, with a certain increase in velocity relative to the normal velocity and a slight increase or unchanged density, and their abnormal causes correspond to shale diapirism. Figure 11: Velocity–density cross-plot with trend line. Figure 10: Gardner correction equation. When processing data from the abnormal high-pressure section, logging parameters such as well depth, velocity, shale content, porosity, and density are selected as features to identify pressure mechanisms. These well-divided abnormal pressure sample data are randomly divided into training and testing set samples in a 7:3 ratio, and the sample training set is balanced by the SMOTE algorithm to ensure the robustness and generalization ability of the model. To eliminate the impact of different data dimensions, the maximum-minimum normalization method is used to standardize the dataset, making each indicator have the same scale, thereby effectively improving the training effect. The Bayesian optimization algorithm based on the Gaussian process is introduced to optimize the number of base models, the depth of decision trees, and the learning rate of the LightGBM model. The search ranges for these parameters are [1, 100], [1, 50], and [0, 1], respectively. Through 50 iterations of the Bayesian optimization algorithm, the combination parameters of the LightGBM model with the highest recognition accuracy are finally obtained. The search and optimization process of the Bayesian optimization algorithm is shown in Figures 12 and 13. Figure 12 is a slice graph of the parameter relationships in the model, representing the progress of different hyperparameters in multiple trials. The horizontal coordinates are the learning rate, tree depth, and tree number, three hyperparameters in the model, and the vertical coordinates are the target function values, representing the model accuracy, with the legend on the right representing the number of iterations; Figure 13 is a historical record graph of model hyperparameter optimization, representing the performance improvement process of the model in multiple iterations. The horizontal coordinate is the number of iterations, and the vertical coordinate is the target function value, representing the model accuracy, with the blue point representing the current iteration accuracy and the red point representing the historical best accuracy. Figure 12: Results of all hyperparameter trials with number of tests. After comparative testing, the original LightGBM model has an accuracy rate of 0.906 on the test set. However, after model optimization using the Bayesian optimization algorithm, the new model achieved a higher accuracy rate on the same test set, reaching 0.942. This means that the new model is more accurate and reliable in identifying the mechanisms of abnormal pressure. Figure 14 is the confusion matrix of the results of the two models in identifying the abnormal pressure mechanism in the test set, used to evaluate the performance of the classification model. The horizontal and vertical axes represent the predicted values and true values of the model, respectively, with 0, 1, and 2 representing the abnormal pressure mechanisms of undercompaction, hydrothermal pressure increase, and shale diapirism, respectively. The color bar on the right explains the range of sample quantities corresponding to the color of each cell in the confusion matrix.