# EUR Prediction for Shale Gas Wells Based on the ROA-CatBoost-AM Model
## 3 Analysis of Primary Production Control Factors and EUR Prediction Model
### Analysis of Primary Production Control Factors and EUR Prediction  
An attention mechanism was introduced to assign weights to the eight selected factors influencing EUR, which were then used as inputs to the model. The Rabbit Optimization Algorithm was employed to optimize the model's hyperparameters. Given the limited  
\begin{table}
\begin{tabular}{c c c} \hline \hline  & **Number** & **Influencing Factors** \\ \hline Geological factors & 3 & True vertical depth, Thickness of high-quality reservoir, and Permeability \\ Engineering factors & 3 & Drilled length of high-quality reservoir, Length of horizontal section, and Stage length \\ Production factors & 2 & FBR330, Average pumping rate \\ \hline \hline \end{tabular}
\end{table}
Table 1: Distribution of influencing factors.  
Figure 6: Remove redundant influencing factors and create a correlation analysis heatmap.  
number of samples, to reduce the randomness caused by a single partitioning of the training and validation sets, and to avoid selecting non-generalizable hyperparameters or models due to specific data splits, a 10-fold cross-validation method was adopted. This approach maximizes the utilization of the available dataset, enhancing the generalization capability of the model. The performance of different models was compared to evaluate their results, and the final EUR prediction model was identified.  
This study employs Spearman correlation and mutual information to select key features, reducing redundancy while preserving high-information variables. Subsequently, an attention mechanism is introduced to assign adaptive weights to features, enhancing CatBoost's adaptability to different wells and improving interpretability. Finally, the Rabbit Optimization Algorithm (ROA) is utilized for hyperparameter optimization, ensuring that CatBoost achieves optimal performance under 10-fold cross-validation. This approach effectively integrates statistical feature selection, deep learning-based attention mechanisms, gradient boosting trees, and intelligent optimization algorithms, enabling high-precision modeling of shale gas EUR prediction while providing deeper insights into feature contributions, thereby offering intelligent decision support for unconventional oil and gas development.  
The performance of the models was evaluated using Mean Squared Error (MSE), Mean Absolute Error (MAE), and the coefficient of determination (R\({}^{2}\)) [36].  
MSE reflects the average squared error between the predicted and actual values.  
MAE represents the average absolute error between the predicted and actual values.  
R\({}^{2}\) measures the model's ability to explain the variance in the data. The closer R\({}^{2}\) is to 1, the better the model explains the variability of the target variable.  
The formulas for these metrics are as follows:  
\[\text{MSE}=\frac{1}{n}\sum_{i=1}^{n}\left(y_{i}-\hat{y}_{i}\right)^{2} \tag{5}\]  
\[\text{MAE}=\frac{1}{n}\sum_{i=1}^{n}\left|y_{i}-\hat{y}_{i}\right| \tag{6}\]  
\[\text{R}^{2}=1-\frac{\sum_{i=1}^{n}\left(y_{i}-\hat{y}_{i}\right)^{2}}{\sum_{ i=1}^{n}\left(y_{i}-\overline{y}\right)^{2}} \tag{7}\]  
\[\text{RMSE}=\sqrt{\frac{1}{n}\sum_{i=1}^{n}\left(\hat{y}_{i}-y_{i}\right)^{2}} \tag{8}\]  
where \(y_{i}\) represents the actual observed value of the \(i\)th data point, \(\hat{y}_{i}\) denotes its corresponding predicted value, \(n\) is the total number of samples, and \(\overline{y}\) refers to the mean of the actual observed values.